Vim mappings: Ctrl-l for => and arrow keys to window resize
This commit is contained in:
parent
e406c6eda8
commit
e56c32b568
@ -285,6 +285,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke
|
||||
* `,K` - GitGrep the current word up to next exclamation point (useful for ruby foo! methods)
|
||||
* `Cmd-*` - highlight all occurrences of current word (similar to regular `*` except doesn't move)
|
||||
* `,hl` - toggle search highlight on and off
|
||||
* `Enter` - hit enter in normal mode to unhighlight search
|
||||
* `,gg` - GitGrep command line, type between quotes
|
||||
* `,gd` - GitGrep def (greps for 'def [function name]') when cursor is over the function name
|
||||
* `,gcp` - GitGrep Current Partial to find references to the current view partial
|
||||
@ -317,8 +318,9 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke
|
||||
#### RSI-reduction
|
||||
|
||||
* `Cmd-k` and `Cmd-d` to type underscores and dashes (use Shift), since they are so common in code but so far away from home row
|
||||
* `;` in addition to `:` - avoid Shift for common tasks, just hit semicolon to get to ex mode
|
||||
* `,.` to go to last edit location instead of `'.` because the apostrophe is hard on the pinky
|
||||
* `Cmd-k` and `Cmd-d` to type underscores and dashes (use Shift), since they are so common in code but so far away from home row
|
||||
* `Ctrl-l` to insert a => hashrocket (thanks @garybernhardt)
|
||||
* `,.` to go to last edit location (same as `'.`) because the apostrophe is hard on the pinky
|
||||
* `Cmd-'` and `Cmd-"` to change content inside quotes
|
||||
* Cmd-Space to autocomplete. Tab for snipmate snippets.
|
||||
* `fd` and `jk` key *chords* - hit the first two homerow buttons simultaneously on either side of the keyboard to go to beginning and end of line
|
||||
@ -333,7 +335,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke
|
||||
|
||||
* `Ctrl-h,l,j,k` - to move left, right, down, up between windows
|
||||
* `Q` - Intelligent Window Killer. Close window `wincmd c` if there are multiple windows to same buffer, or kill the buffer `bwipeout` if this is the last window into it.
|
||||
* `+` and `-` for resizing vertical windows
|
||||
* Arrow keys - resize windows (up/down for vertical, left=make smaller horizontally, right=make bigger horizontally)
|
||||
|
||||
#### Splits
|
||||
|
||||
|
@ -38,6 +38,9 @@ imap <silent> <D-d> _
|
||||
imap <silent> <D-K> -
|
||||
imap <silent> <D-D> -
|
||||
|
||||
" gary bernhardt's hashrocket
|
||||
imap <c-l> <space>=><space>
|
||||
|
||||
" Use the two first fingers on both sides of the keyboard
|
||||
" simultaneously to go to the beginning or end of line
|
||||
Arpeggio nnoremap jk $
|
||||
@ -141,9 +144,11 @@ map <silent> <D-9> :tabn 9<cr>
|
||||
nnoremap <silent> vv <C-w>v
|
||||
nnoremap <silent> ss <C-w>s
|
||||
|
||||
" Resize vertical windows by hitting plus and minus
|
||||
nnoremap <silent> + <C-w>+
|
||||
nnoremap <silent> - <C-w>-
|
||||
" Resize windows with arrow keys
|
||||
nnoremap <Up> <C-w>+
|
||||
nnoremap <Down> <C-w>-
|
||||
nnoremap <Left> <C-w><
|
||||
nnoremap <Right> <C-w>>
|
||||
|
||||
" create <%= foo %> erb tags using Ctrl-k in edit mode
|
||||
imap <silent> <C-K> <%= %><Esc>3hi
|
||||
@ -172,6 +177,9 @@ nmap <silent> ,vc yy:<C-f>p<C-c><CR>
|
||||
" Type ,hl to toggle highlighting on/off, and show current value.
|
||||
noremap ,hl :set hlsearch! hlsearch?<CR>
|
||||
|
||||
" clear highlights by hitting enter
|
||||
noremap <CR> :nohlsearch<CR>
|
||||
|
||||
" Apple-* Highlight all occurrences of current word (like '*' but without moving)
|
||||
" http://vim.wikia.com/wiki/Highlight_all_search_pattern_matches
|
||||
nnoremap <D-*> :let @/='\<<C-R>=expand("<cword>")<CR>\>'<CR>:set hls<CR>
|
||||
|
Loading…
Reference in New Issue
Block a user