diff options
| -rw-r--r-- | vimrc | 18 |
1 files changed, 12 insertions, 6 deletions
| @@ -64,7 +64,8 @@ let g:netrw_altv = 1 | " open files on the righ | |||
| 64 | 64 | ||
| 65 | " NERDTree: ==========================================. | 65 | " NERDTree: ==========================================. |
| 66 | Plug 'scrooloose/nerdtree' | " replace NetRW, which is kind of buggy | 66 | Plug 'scrooloose/nerdtree' | " replace NetRW, which is kind of buggy |
| 67 | let NERDTreeCascadeSingleChildDir = 0 | " I don't get how one can use <m> to create files in that included directory | 67 | let NERDTreeCascadeSingleChildDir = 0 | " I don't get how one can use <m> to create files in that included directory |
| 68 | let NERDTreeIgnore = ['\.aux$'] | ||
| 68 | set winwidth=30 " keep NERDTreeWindow at least this size | 69 | set winwidth=30 " keep NERDTreeWindow at least this size |
| 69 | set winminwidth=30 " (and all other windows, so TODO: watch out) | 70 | set winminwidth=30 " (and all other windows, so TODO: watch out) |
| 70 | 71 | ||
| @@ -235,12 +236,13 @@ let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell' | |||
| 235 | " settings ============================================. | 236 | " settings ============================================. |
| 236 | " | 237 | " |
| 237 | " autocmd BufEnter * lcd %:p:h | 238 | " autocmd BufEnter * lcd %:p:h |
| 238 | set autochdir | " When on, Vim will change the current working directory | 239 | " set autochdir | " When on, Vim will change the current working directory |
| 239 | set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here | 240 | set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here |
| 240 | " set selectmode=mouse,key,cmd | " enters vim's select mode when pressing shift-left or shift-END | 241 | " set selectmode=mouse,key,cmd | " enters vim's select mode when pressing shift-left or shift-END |
| 241 | " set keymodel=startsel,stopsel | " makes shift-left, shift-right available for selecting text | 242 | " set keymodel=startsel,stopsel | " makes shift-left, shift-right available for selecting text |
| 242 | set breakindent | " Every wrapped line will continue visually indented | 243 | set breakindent | " Every wrapped line will continue visually indented |
| 243 | set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) | 244 | set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) |
| 245 | set cmdheight=2 | " sets the command line's height | ||
| 244 | set complete+=d | " scan current and included files for defined name or macro | 246 | set complete+=d | " scan current and included files for defined name or macro |
| 245 | set complete+=i | " scan current and included files for completions | 247 | set complete+=i | " scan current and included files for completions |
| 246 | set concealcursor=nc | " limits the display of concealed text to normal and command mode | 248 | set concealcursor=nc | " limits the display of concealed text to normal and command mode |
| @@ -274,11 +276,13 @@ set scrolljump=5 | " how many lines get scrolled into view when cur | |||
| 274 | set splitbelow | " open new windows below the current one (i find that more intuitive) | 276 | set splitbelow | " open new windows below the current one (i find that more intuitive) |
| 275 | set shiftround | " indent/unindent snaps to multiple of shiftwidth | 277 | set shiftround | " indent/unindent snaps to multiple of shiftwidth |
| 276 | set showcmd | " essential: show keys of combined commands in the lower right corner | 278 | set showcmd | " essential: show keys of combined commands in the lower right corner |
| 277 | " set t_Co=256 | " required on some ssh sessions | 279 | set t_Co=256 | " required on some ssh sessions |
| 278 | " set textwidth=100 | " line length (80 used to be default, but...) | 280 | " set textwidth=100 | " line length (80 used to be default, but...) |
| 281 | set textwidth=120 | " @IPQ | ||
| 282 | set colorcolumn=120 | " @IPQ | ||
| 279 | set thesaurus+=/home/max/.vim/thesaurus/php.txt | 283 | set thesaurus+=/home/max/.vim/thesaurus/php.txt |
| 280 | set ts=2 sts=2 sw=2 expandtab | " indentation which i like (abbr: tabstop, softtabstop, shiftwidth) | 284 | set ts=4 sts=4 sw=4 expandtab | " @IPQ |
| 281 | set ttimeoutlen=10 | " set esc key timeout in ms- | 285 | set ttimeoutlen=50 | " set esc key timeout in ms- |
| 282 | set updatetime=1000 | " updates the screen more often | 286 | set updatetime=1000 | " updates the screen more often |
| 283 | set writedelay=0 | 287 | set writedelay=0 |
| 284 | 288 | ||
| @@ -372,6 +376,7 @@ if has("autocmd") | |||
| 372 | autocmd FileType python setlocal keywordprg=pydoc | 376 | autocmd FileType python setlocal keywordprg=pydoc |
| 373 | autocmd FileType vim setlocal keywordprg=:help |. | 377 | autocmd FileType vim setlocal keywordprg=:help |. |
| 374 | autocmd FileType c,cpp setlocal equalprg=clang-format | 378 | autocmd FileType c,cpp setlocal equalprg=clang-format |
| 379 | autocmd FileType c,cpp setlocal breakat-=- | ||
| 375 | 380 | ||
| 376 | " keyboard mapping for xml alike languages | 381 | " keyboard mapping for xml alike languages |
| 377 | " Alt-Up : Move cursor up one tag | 382 | " Alt-Up : Move cursor up one tag |
| @@ -406,6 +411,7 @@ if has("autocmd") | |||
| 406 | augroup END | 411 | augroup END |
| 407 | 412 | ||
| 408 | if has('nvim') | 413 | if has('nvim') |
| 414 | autocmd BufEnter term://* set nobuflisted | ||
| 409 | else | 415 | else |
| 410 | augroup vimonly | 416 | augroup vimonly |
| 411 | autocmd VimLeave * call system("echo -n $'" . escape(getreg(), "'") . "' | xsel -ib") | 417 | autocmd VimLeave * call system("echo -n $'" . escape(getreg(), "'") . "' | xsel -ib") |
| @@ -446,7 +452,7 @@ if !has('nvim') | |||
| 446 | set ttymouse=xterm2 | 452 | set ttymouse=xterm2 |
| 447 | set ttyscroll=100 | " improves speed for terminal vim, incomp. with nvim | 453 | set ttyscroll=100 | " improves speed for terminal vim, incomp. with nvim |
| 448 | set ttyfast | " improves speed for terminal vim (incomp. with nvim) | 454 | set ttyfast | " improves speed for terminal vim (incomp. with nvim) |
| 449 | set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) incomp. with nvim | 455 | " set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) incomp. with nvim |
| 450 | else | 456 | else |
| 451 | " shortcut \t opens a terminal in a horizontal split | 457 | " shortcut \t opens a terminal in a horizontal split |
| 452 | nnoremap <leader>t :new +terminal<CR> | 458 | nnoremap <leader>t :new +terminal<CR> |
