2
0
mirror of https://github.com/webgefrickel/dotfiles synced 2024-11-17 09:25:52 +00:00
steffen-dotfiles/vim/config/leaderkeys.vim
Steffen Rademacker c911f34027 Split up vimrc in separate files
With default configs and configs for plugins. Wrap autocommands
in a vimrc group as well.
2015-05-05 13:18:25 +02:00

35 lines
1.0 KiB
VimL

" take me to your leader!
"======================================================================
let g:mapleader = ","
let g:maplocalleader = ","
" open new vertical split and change to split
nnoremap <leader>\ <C-w>v<C-w>l
nnoremap <leader>- <C-w>s<C-w>j
" Adjust viewports/splits to equal widths/heights
nnoremap <leader>= <C-w>=
" open a new split and edit the vimrc // easy sourcing vimrc
nnoremap <leader>ve <C-w>v<C-w>l :e ~/.vimrc<cr>
nnoremap <leader>vs :source ~/.vimrc<cr>
" Opens an edit command with the path of the currently edited file filled in
nnoremap <leader>o :e <C-R>=expand("%:p:h") . "/" <CR>
" Yank to clipboard with clipper -- see https://github.com/wincent/clipper
nnoremap <leader>y :call system('nc localhost 8377', @0)<CR>
" reset search
nnoremap <leader><space> :noh<cr>
" short command to strip trainling whitepsace
nnoremap <leader>w :call <SID>StripTrailingWhitespaces()<CR>
" Find merge conflict markers
nnoremap <leader>g /\v^[<\|=>]{7}( .*\|$)<CR>
" paste keeping indentation
nnoremap <leader>p p`[v`]=