2
0
mirror of https://github.com/webgefrickel/dotfiles synced 2024-11-03 15:40:30 +00:00
steffen-dotfiles/vim/config/leaderkeys.vim

32 lines
941 B
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>
" Find merge conflict markers
nnoremap <leader>g /\v^[<\|=>]{7}( .*\|$)<CR>
" paste keeping indentation
nnoremap <leader>p p`[v`]=