vim: add swoop and gF

This commit is contained in:
2020-06-22 11:28:04 +01:00
parent d4531fee53
commit 65bda28354

29
vimrc
View File

@@ -39,7 +39,6 @@ call plug#begin('~/.vim/plugged')
Plug 'majutsushi/tagbar'
Plug 'tpope/vim-obsession'
Plug 'tpope/vim-dispatch'
Plug 'tpope/vim-surround'
Plug 'tmux-plugins/vim-tmux-focus-events'
Plug 'moll/vim-bbye'
@@ -47,6 +46,8 @@ call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
endif
Plug 'tpope/vim-surround'
Plug 'pelodelfuego/vim-swoop'
Plug 'dense-analysis/ale'
Plug 'tpope/vim-commentary'
@@ -96,6 +97,12 @@ nnoremap <C-L> viwu
nnoremap <leader>q :Bdelete<CR>
" Repeat the last macro
nnoremap Q @@
" Close all folds
nnoremap c- zM
" nmap <leader>cw y/ <CR>
nmap <leader>wp 0v$gq
@@ -607,3 +614,23 @@ nmap <silent> tG :TestVisit<CR>d
" nmap <C-M> :<CR>
" nmap <C-M> :Make<CR>
" nmap <C-S-M> :Make!<CR>
" Opening with the default program
if has('macunix')
" Open in default program
nnoremap gF :!open <cfile><CR>
" Open Finder
nnoremap gH :!open %:p:h<CR>
" Open in Safari
nnoremap gB :!open -a Safari %<CR>
elseif has('unix')
" Open in default program
nnoremap gF :!xdg-open <cfile><CR>
" Open file manager
nnoremap gH :!xdg-open %:p:h<CR>
" Open in Browser
nnoremap gB :!xdg-open %<CR>
endif
" Markdown folding
let g:markdown_fold_style = 'nested'