Make vim happier in general.
This commit is contained in:
parent
1cc0d135ec
commit
14c46b12ae
2 changed files with 43 additions and 3 deletions
|
@ -85,6 +85,10 @@ hi jsDocParam cterm=NONE ctermfg=2 ctermbg=NONE
|
|||
hi jsDocTypeNoParam cterm=NONE ctermfg=2 ctermbg=NONE
|
||||
hi jsDocSeeTag cterm=NONE ctermfg=2 ctermbg=NONE
|
||||
|
||||
" PHPDoc comments are comments.
|
||||
hi phpDocTags cterm=NONE ctermfg=2 ctermbg=NONE
|
||||
hi phpDocCustomTags cterm=NONE ctermfg=2 ctermbg=NONE
|
||||
|
||||
" Line numbers are grey
|
||||
hi LineNr cterm=NONE ctermfg=7 ctermbg=NONE
|
||||
|
||||
|
|
|
@ -66,9 +66,23 @@ set shell=bash
|
|||
" I want to use this to manage my ascii drawings
|
||||
set virtualedit=block
|
||||
|
||||
" Swap block and visual block
|
||||
nnoremap v <C-V>
|
||||
nnoremap <C-V> v
|
||||
|
||||
vnoremap v <C-V>
|
||||
vnoremap <C-V> v
|
||||
|
||||
" Automatically read on update
|
||||
set autoread
|
||||
|
||||
" I am always adding /g. No longer, suckers!
|
||||
set gdefault
|
||||
|
||||
" Set comment line length
|
||||
set tw=72
|
||||
set fo=c
|
||||
|
||||
" Navigate to test, and back
|
||||
|
||||
" Find test counterpart.
|
||||
|
@ -375,15 +389,37 @@ augroup vimrcEx
|
|||
" This will automatically insert a new line in insert mode when a
|
||||
" line gets too long (above 80 characters). I can also run gqap
|
||||
" in normal mode to reflow a paragraph.
|
||||
"
|
||||
" I would like to have a customised version of this work with
|
||||
" comments in code, but I haven't gotten that far yet.
|
||||
autocmd FileType
|
||||
\ markdown,
|
||||
\ setl tw=80 fo=t1
|
||||
|
||||
augroup END
|
||||
|
||||
" Make directories in a filename if they don't exist.
|
||||
|
||||
function! AskQuit (msg, options, quit_option)
|
||||
if confirm(a:msg, a:options) == a:quit_option
|
||||
exit
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! EnsureDirExists ()
|
||||
let required_dir = expand("%:h")
|
||||
if !isdirectory(required_dir)
|
||||
try
|
||||
call mkdir( required_dir, 'p' )
|
||||
catch
|
||||
echom "Could not create directory"
|
||||
exit
|
||||
endtry
|
||||
endif
|
||||
endfunction
|
||||
|
||||
augroup AutoMkdir
|
||||
autocmd!
|
||||
autocmd BufNewFile * :call EnsureDirExists()
|
||||
augroup END
|
||||
|
||||
" Set the statusline.
|
||||
" This shows something like:
|
||||
"
|
||||
|
|
Loading…
Add table
Reference in a new issue