dotfiles/.config/vim/links.vim

7 lines
446 B
VimL

nnoremap gf :let @a='../'.expand('%')<CR>vi>y<Esc>:tabnew <C-R>"<CR>:let @"=@a
vnoremap gf y<Esc>:let @a='../'.expand('%')<CR>:tabnew <C-R>"<CR>:let @"=@a
nnoremap mf viwc[]<Esc>hpla(<>)<Left><Left><C-R>=expand('%')<CR><Esc>F/l"_dt>hpa.md<Esc>
vnoremap mf c[]<Esc>hpla(<>)<Left><Left><C-R>=expand('%')<CR><Esc>F/l"_dt>hpa.md<Esc>
nnoremap ml :r!grep -Rl '' .<Left><Left><Left>
vnoremap ml y<Esc>:execute 'r!grep -Rl '.shellescape(@", 1).' .'<CR>