Skip to content

Instantly share code, notes, and snippets.

@damitkwr
Created June 21, 2018 20:22
Show Gist options
  • Save damitkwr/5bd7f1f0e39be632ea312f10df2cf317 to your computer and use it in GitHub Desktop.
Save damitkwr/5bd7f1f0e39be632ea312f10df2cf317 to your computer and use it in GitHub Desktop.
" These two mappings, which apply to PLATFORM-SELECT only,
" get 'y' and 'p' to work with the mouse selection.
pnoremap y vy
pnoremap p vp
" These mapping are handy if line wrap is turned on.
" With them, j,k,$,0,^ behave visually as usual.
" On wrapped lines the cursor will not change visual line.
" The arrow keys and <Home>, <End> still behave as usual,
" they could be mapped as well.
" Uncomment them and try them out with wrapped lines.
map j gj
map k gk
map $ g$
map 0 g0
map ^ g^
imap kj <Esc>
vmap kj <Esc>
noremap <Space>rr :mak<Space>ru<Space>%<CR>
noremap <Space>rR :mak<Space>ru<Space>p<CR>
noremap <Space>w/ :vsplit<CR>
noremap <Space>wh <C-w><C-h>
noremap <Space>wl <C-w><C-l>
noremap <Space>w= <C-w>=
noremap <Space>wd <C-w>c
noremap <Space>qq :wall<CR>:quit<CR>
noremap <Space>fs <C-S>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment