-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
111 lines (83 loc) · 2.65 KB
/
Copy pathvimrc
File metadata and controls
111 lines (83 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
execute pathogen#infect()
filetype plugin indent on
set title
set modeline
set modelines=5
set cursorline
set encoding=utf-8
set relativenumber
set number
set expandtab
set tabstop=4
set shiftwidth=4
" swap files
set directory^=$HOME/.vim/swp//
" search
set ignorecase
set smartcase
set incsearch
set hlsearch
"mouse
set mouse=a
set mousemodel=extend
set clipboard=unnamedplus
:highlight Directory guifg=#FF0000 ctermfg=red
:highlight ExtraWhitespace ctermbg=darkgreen guibg=lightgreen
:autocmd ColorScheme * highlight ExtraWhitespace ctermbg=darkgreen guibg=lightgreen
:match ExtraWhitespace /\s\+$/
" toggle nerd tree
noremap <F2> :NERDTreeToggle<CR>
set pastetoggle=<F3>
" fzf bindings
noremap <F4> :FZF<CR>
inoremap <F4> <esc>:w<CR>:FZF<CR>
" launch current file
nnoremap <F5> :!%:p<CR>
" tagbar toggle
nmap <F8> :TagbarToggle<CR>
let mapleader = ","
noremap <leader>ev :vsp $MYVIMRC<CR>
noremap <leader>sv :source $MYVIMRC<CR>
" buffer management
noremap <leader>h :bp<CR>
noremap <leader>l :bn<CR>
noremap <leader>w :bd<CR>
" clear search highlighting
nnoremap <silent> <Leader>/ :nohlsearch<CR>
" pandoc , markdown
command! -nargs=* RunSilent
\ | execute ':silent !'.'<args>'
\ | execute ':redraw!'
nmap <Leader>pc :RunSilent pandoc -o /tmp/vim-pandoc-out.pdf %<CR>
nmap <Leader>pp :RunSilent xdg-open /tmp/vim-pandoc-out.pdf &<CR>
" trim trailing whitespace
autocmd BufWritePre *.py :%s/\s+$//e
"
" https://github.com/ludovicchabant/vim-gutentags
let g:gutentags_ctags_extra_args = ['--fields=+l'] " required by YouCompleteMe
" https://github.com/majutsushi/tagbar configuration
let g:tagbar_autofocus = 1
" https://github.com/kien/ctrlp.vim configuration
let g:ctrlp_extensions = ['tag']
" https://github.com/vim-airline/vim-airline configuration
let g:airline_powerline_fonts=1
let g:airline#extensions#tabline#enabled = 1
" https://github.com/vim-airline/vim-airline-themes configuration
let g:airline_theme='dark'
set background=dark
colorscheme PaperColor
" https://github.com/SirVer/ultisnips configuration
let g:UltiSnipsExpandTrigger="<C-j>"
let g:UltiSnipsJumpForwardTrigger="<C-j>"
let g:UltiSnipsJumpBackwardTrigger="<C-k>"
" https://github.com/vim-syntastic/syntastic configuration
let g:syntastic_rust_checkers = ['clippy']
" https://github.com/Valloric/YouCompleteMe configuration
let g:ycm_autoclose_preview_window_after_insertion = 1
let g:ycm_collect_identifiers_from_tags_files = 1
let g:ycm_seed_identifiers_with_syntax = 1
nnoremap <leader>jd :YcmCompleter GoTo<CR>
" https://github.com/rust-lang/rust.vim.git configuration
let g:rustfmt_autosave = 1
" https://github.com/Xuyuanp/nerdtree-git-plugin configuration
let g:NERDTreeShowIgnoredStatus = 1