Giter Site home page Giter Site logo

husk-x.vim's Introduction

husk-x.vim

Mappings that boost vim command line mode with (basic) undo support.

Installation

  • vim-plug
    Plug 'critiqjo/husk-x.vim'

  • Vundle
    Plugin 'critiqjo/husk-x.vim'

Note: In order to enable alt mappings (M-f, M-b etc) Mac OS users using Terminal.app may need to go to Preferences > Profiles > Keyboard and tick "Use Option as Meta key".

Mappings

All mappings work only in Vim command line mode. Below, "undoable" marks those commands whose state before execution is pushed to the undo stack.

Mapping Description Undoable
<C-a> wraps <Home> no
<C-e> wraps <End> no
<M-h> move cursor left no
<M-l> move cursor right no
<M-w> cursor w-jump no
<M-b> cursor b-jump no
<M-e> cursor e-jump no
<M-W> cursor W-jump no
<M-B> cursor B-jump no
<M-E> cursor E-jump no
<M-k> wraps <Up> yes
<M-j> wraps <Down> yes
<C-k>* clear line after cursor yes
<C-u> clear line backwards yes
<M-d> delete "word" after cursor yes
<C-w> delete "word" backwards yes
<M-x> wraps <Del> no
<C-_># pops the undo stack no

* For the default <C-k> behavior, open command-line window using <C-f>.

# <C-/> and <C-_> seems identical to vim (see this SO answer).

Configuration

Global variable Default Description
g:husk#undo_stack_capacity 64 Undo stack max capacity
g:husk#undo_stack_cut_by 16 When undo stack exceeds its capacity, the oldest cut_by number of items is popped off

Non-goals

  • Redos

About

husk-x.vim was inspired by vim-husk plugin.

Differences from vim-husk:

  • support for undoing
  • prefers "meta + [wWbBeE]" for word jumps
  • removed vim-rsi mappings and behaviour

Licence

MIT

husk-x.vim's People

Contributors

janko avatar johncf avatar rremizov avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.