Giter Site home page Giter Site logo

conneroisu / vim-toggle Goto Github PK

View Code? Open in Web Editor NEW
29.0 1.0 1.0 7.85 MB

This is a plugin that adds the ability to toggle on and off vim into obsidian with a nice notice to let you know when you switched.

License: MIT License

JavaScript 15.10% TypeScript 84.90%
obsidian obsidian-md obsidian-notes obsidian-plugin obsidian-vault plugin vim markdown npm nvim

vim-toggle's Introduction

Build obsidian plugin codebeat badge

Vim Toggle Plugin Obsidian

made with ๐Ÿค by Conner Ohnesorge

Toggle the state of Vim inside of Obsidian, in response to Obsidian Canvas Core Plugin Functionality. A gif showing the pure basics of the plugin The new Canvas Plugin has prompted me to make a small plugin to toggle the state of use of the vim editor in obsidian.

Wondering what vi/vim is?

### Vim in 100 Seconds - YouTube https://www.youtube.com โ€บ watch

### Understanding Vi and Vim (Vi IMproved) in 10 Minutes https://www.youtube.com โ€บ watch

The Basics

This plugin is a simple plugin that allows for the toggling of vim mode in Obsidian with a command configurable to a hotkey. You can also turn off or on notifications for the plugin. That pretty much it for basic functionality.

[!important]+ Main Offerings

  • Toggle Vim mode
  • Optional Notification when toggling
  • Community Avaliability

Usage

Usage for this plugin is done through a settings tab accessible boolean variable and a command to run that toggles and untoggles vim inside of Obsidian. The command can be bound to a hotkey for quicker and more efficient use.

To access the plugin settings, click on the settings cog in the top right corner of Obsidian or use a hotkey Ctrl+,From there, find the Vim Mode setting and toggle it to "On". This will enable Vim Toggle within the current instance of obsidian.

Basic Usage

Once installed, you can toggle vim mode on and off with a command. You can configure this command to a hotkey of your choice in the settings. You can also turn off or on notifications for when vim mode is turned on or off.

Normal installation

To install this plugin normally, you can navigate within the obsidian app to the community plugins to view and install this plugin without even exiting the app! Hopefully you can find some use for it yourself! (You will be able to do this soon).

Manual Installation

To install this plugin manually, you'll need to download the source code from the GitHub repository and place it in the plugins folder in your Obsidian data directory. Once that is done, restart Obsidian and you should be good to go.

Support

If you have any questions or problems with this plugin, you can reach out through a github issue regarding issues, updates, features, and bug reports. We also have a support page that includes information about the plugin and how to use it within the wikipedia part of github.

This project uses Typescript to provide type checking and documentation. The repo depends on the latest plugin API (obsidian.d.ts) in Typescript Definition format, which contains TSDoc comments describing what it does.

Feel free to donate to my kofi and/or share this project!

kofi: conneroisu

Use Case

Writting inside of obsidian canvas mode can be alittle tedious using vim mode cause of the constant inserting, this plugin allows for the user to evade these difficulties by switching to regular typing from vim mode temporarily.

Contributions

Conner Ohnesorge
conner.jpeg
github username: conneroisu
email: [email protected]

vim-toggle's People

Contributors

conneroisu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

andrewbaxter439

vim-toggle's Issues

I would love to have a toggle for mobile. When I'm working with my iPad half the time I have a keyboard plugged in (so I'm using vim) and the other half I'm sitting on a couch or something using the stylus, and vim really doesn't work in that situation. Would really like a streamlined way to switch back and forth as needed -- so I'm looking forward to this becoming a community plugin.

          I would love to have a toggle for mobile.  When I'm working with my iPad half the time I have a keyboard plugged in (so I'm using vim) and the other half I'm sitting on a couch or something using the stylus, and vim really doesn't work in that situation. Would really like a streamlined way to switch back and forth as needed -- so I'm looking forward to this becoming a community plugin.

Originally posted by @hollyhudson in #1 (comment)

adding a toggle button

Thanks for putting this plugin together. It would be great to also have a "button" somewhere in the interface that would allow one do quickly toggle the vim mode on/off with a mouse (as opposed to just a keyboard shortcut).
thanks!

Adding key bindings for exiting insert mode and ...

it would be awesome to have a key binding for exiting the insert mode to normal mode and also view mode to normal mode

I'll use jk for that myself but many may use jj key to exit insert mode

thanks for the awesome plugin ๐Ÿ’Ž

Cannot download from Community plug ins or manual

Hey, thanks for creating the plug in. I ran into the same issue when using canvas.

Unfortunately, it cannot be downloaded from community plug ins and manual installs also fail for me right now. It says that the main.js is missing from the latest release.

Hooks for toggling

Hi! I love this plugin. I was wondering if it might be possible to put hooks in for toggling. This might be something that could be made generic, but the one hook that I think I would really benefit from would be to auto-toggle to make sure I'm not in vim mode when I add a card to a Canvas.

It might be sufficient to be able to do this just when file-open is triggered and the new file is a canvas -- have it drop back from vim mode then. This could be stuck behind a toggle setting.

This may be out of scope for this plugin, but it also seems like the best place for it. Would you be open to a PR implementing it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.