Skip to content

entrez/reedline.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

reedline.vim

Overview

Some little bash/readline style cmdline shortcuts for vim.

Mappings

Shortcut Description
Ctrl-a Jump to start of line
Ctrl-e Jump to end of line
Ctrl-k Delete everything from cursor to end of line
Ctrl-p Cycle up through command history
Ctrl-n Cycle down through command history
Ctrl-b Move one character left
Ctrl-f Move one character right
Alt-b Move one word left
Alt-f Move one word right
Alt-d Delete word after cursor
Alt-BkSpace Rubout word
Ctrl-w Rubout word [or space-delimited word, optionally]
Ctrl-u Delete everything from cursor to start of line
Ctrl-d Delete character
Alt-=, Alt-? Display command completion options
Alt-l Make next word lowercase
Alt-u Make next word UPPERCASE
Alt-c Make next word Capitalized
Ctrl-y "Yank" (put/paste) most recently deleted word
Ctrl-t Transpose characters
Alt-t Transpose words

Configuration

g:reedline_space_delimited_C_w

Once installed, the variable g:reedline_space_delimited_C_w may be set to a nonzero value to force Ctrl-w to behave like it normally does in bash (i.e. rubout the word up to the previous space). Otherwise it will act identically to Alt-BkSpace - as it does by default in zsh, for instance.

g:reedline_max_yank_time

You can set g:reedline_max_yank_time to decide how many seconds can pass between two delete operations before they are considered separate operations for purposes of the yank feature (Ctrl-y). If two operations happen more quickly than that, the deleted text will be combined when yanked as if it was erased in a single operation. By default, this value is 1 second.

Setting g:reedline_max_yank_time to 0 will return to the previous behavior where no operations are combined & the yank register never contains more than the latest discrete deletion.