vimrc: CtrlP, slime, tagbar

This commit is contained in:
2023-03-08 15:26:53 +01:00
parent 1c8133c827
commit 522854ab3d
2 changed files with 17 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
title_inactive_bg_color = "#4C566A"
always_split_with_profile = True
[keybindings]
help = ""
[profiles]
[[default]]
background_color = "#12204d"

16
.vimrc
View File

@@ -34,6 +34,8 @@ if filereadable(expand(vundle_dir) . "/README.md")
Plugin 'tpope/vim-unimpaired'
Plugin 'JuliaEditorSupport/julia-vim'
Plugin 'tell-k/vim-autopep8'
Plugin 'jpalardy/vim-slime'
Plugin 'preservim/tagbar'
call vundle#end() " required
else
@@ -127,10 +129,21 @@ noremap Y y$
command! -bang -range=% -complete=file -nargs=* W <line1>,<line2>write<bang> <args>
command! -bang Q quit<bang>
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlPMixed'
let g:ctrlp_working_path_mode = 'ra' " Look for .git .hg .svn .bzr _darcs
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/]\.(git|hg|svn|data|logs)$',
\ 'file': '\v\.(exe|so|dll)$',
\ }
" Gutentags configuration
if !executable('ctags')
let g:gutentags_enabled = 0
else
nmap <F1> :CtrlPTag<CR>
nmap <F4> :TagbarToggle<CR>
let g:gutentags_add_default_project_roots = 0
let g:gutentags_project_root = ['.git']
@@ -332,6 +345,9 @@ noremap <expr> <F7> LaTeXtoUnicode#Toggle()
noremap! <expr> <F7> LaTeXtoUnicode#Toggle()
autocmd FileType python noremap <buffer> <F8> :call Autopep8()<CR>
let g:slime_target = "tmux"
let g:slime_default_config = {"socket_name": "default", "target_pane": "{last}"}
nmap <Leader>cf :cd %:p:h <CR> " Change dir to parent of current file
nmap <Leader>cg :cd $git_root_location <CR> " Change dir to git root
nmap <Leader>vs :sp $HOME/.vimrc <CR>