Giter Site home page Giter Site logo

vim's Introduction

vim.zsh

A simple vim plugin for zsh

Custom key bindings

A common habit of vim users is to re-map a key sequence to<Esc> in insert mode, to avoid having to reach far on the keyboard. You can do the same here by simply assigning a key binding to the env variable VI_MODE_ESC_INSERT: for example

export VI_MODE_ESC_INSERT="jk" && plug "zap-zsh/vim"

will escape back into normal mode upon pressing jk.

vim's People

Contributors

cameronjlarsen avatar chrishrbatjambit avatar christianchiarulli avatar gennaro-tedesco avatar pheon-dev avatar

Stargazers

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

vim's Issues

cannot remap from viins mode

Thank you for the great work on zap!

I have replaced ohmyzsh vi-mode plugin with the current one, however I have noticed that with this one I cannot seem to define mappings in insert mode along the lines of

bindkey -M viins '<some mappings>' vi-cmd-mode

namely such mappings, although defined, seem to have no effect.

The use case I have is to re-define a mapping to escape back into normal mode (I presume this is quite a common use case for many who do not want to reach out to Esc far away in the upper left corner). Would a re-mapping like the above work for you (and perhaps I have some other settings that conflict, though I do not believe so, I have minimally reproduced it) or how do you suggest to go around it, otherwise?

P. S. Since the above is quite a common use case, why not exposing a variable to the user who could then set their favourite escape sequence? Something along the lines of VI_MODE_ESC_INSERT='...'?

Yank global clipboard

Reproduction

  1. write text in the terminal
  2. go to normal mode
  3. go to visual mode
  4. select some text
  5. yank it (press y)
  6. paste the content using system clipboard (on mac cmd-v)
  7. the pasted content is not what I yanked

When going into visual mode and pressing y it seems to copy the content only in the "zsh vim" session, I can paste the content and it works but when I want to paste (using cmd-v) this content it does work,

Is it possible to yank the selected content into the system clipboard?
thanks!

No such key map "menuselect"

Picture

Can be fixed by adding zmodload -i zsh/complist above the keys in tab complete menu in the [vim.plugin.zsh] file:

...
zmodload -i zsh/complist
# Use vim keys in tab complete menu:
bindkey -M menuselect '^h' vi-backward-char
bindkey -M menuselect '^k' vi-up-line-or-history
bindkey -M menuselect '^l' vi-forward-char
bindkey -M menuselect '^j' vi-down-line-or-history
...

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.