mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-12-22 16:00:24 -05:00
Clean up formatting in the config folder
This commit is contained in:
parent
bc7af807b3
commit
e5f28b842e
14 changed files with 126 additions and 74 deletions
|
@ -18,6 +18,7 @@ endif
|
|||
if !exists("g:disablelinebreaks")
|
||||
let g:disablelinebreaks = 1
|
||||
endif
|
||||
|
||||
if (g:disablelinebreaks == 1)
|
||||
autocmd VimEnter * set textwidth=0
|
||||
endif
|
||||
|
|
|
@ -14,10 +14,21 @@ scriptencoding utf-8
|
|||
|
||||
"INITIALIZE PLUGINS: {{{
|
||||
"create missing plugin config files and directories
|
||||
if exists('*mkdir')|if !isdirectory(glob("~/.vim/tags_by_filetype"))|call mkdir(glob("~/.vim/tags_by_filetype"),'p')|endif|endif
|
||||
if !filereadable(glob("~/.vim/tags"))|new|silent e ~/.vim/tags|silent w|q|endif
|
||||
if !filereadable(glob("~/.vim/snippets.json"))|new|silent e ~/.vim/snippets.json|silent w|q|endif
|
||||
if !filereadable(glob("~/.vim/filetypes.vim"))|new|silent e ~/.vim/filetypes.vim|silent w|q|endif
|
||||
if exists('*mkdir') && !isdirectory(glob("~/.vim/tags_by_filetype"))
|
||||
call mkdir(glob("~/.vim/tags_by_filetype"),'p')
|
||||
endif
|
||||
|
||||
if !filereadable(glob("~/.vim/tags"))
|
||||
new|silent e ~/.vim/tags|silent w|q
|
||||
endif
|
||||
|
||||
if !filereadable(glob("~/.vim/snippets.json"))
|
||||
new|silent e ~/.vim/snippets.json|silent w|q
|
||||
endif
|
||||
|
||||
if !filereadable(glob("~/.vim/filetypes.vim"))
|
||||
new|silent e ~/.vim/filetypes.vim|silent w|q
|
||||
endif
|
||||
|
||||
"load plugins in vim/bundle/ and vim/bundle.user/
|
||||
execute pathogen#infect('bundle/{}', 'bundle.user/{}')
|
||||
|
|
|
@ -32,7 +32,6 @@ function! LLFugitive()
|
|||
return strlen(_) ? mark._ : ''
|
||||
endif
|
||||
catch
|
||||
|
||||
endtry
|
||||
|
||||
return ''
|
||||
|
|
|
@ -12,6 +12,7 @@ else
|
|||
\ 'active_filetypes':[],
|
||||
\ 'passive_filetypes':[]
|
||||
\ }
|
||||
|
||||
let g:syntastic_check_on_open = 1
|
||||
else
|
||||
let g:syntastic_mode_map = {
|
||||
|
@ -19,6 +20,7 @@ else
|
|||
\ 'active_filetypes':[],
|
||||
\ 'passive_filetypes':[]
|
||||
\ }
|
||||
|
||||
let g:syntastic_check_on_open = 0
|
||||
endif
|
||||
|
||||
|
@ -28,16 +30,19 @@ else
|
|||
\ 'NameError:.* is undefined',
|
||||
\ 'FileError:.*'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_scss_sass_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ 'File to import not found or unreadable.*'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_java_javac_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ 'cannot find symbol.*',
|
||||
\ 'method does not override or implement a method from a supertype.*',
|
||||
\ 'package [^\ ]* does not exist.*'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_javascript_eslint_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ '.* is defined but never used',
|
||||
|
@ -45,26 +50,31 @@ else
|
|||
\ 'Missing "use strict" statement',
|
||||
\ 'Unexpected [^ ]* statement.*'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_javascript_jshint_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ 'Expected an assignment or function call and instead saw an expression.'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_javascript_standard_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ '.* is defined but never used',
|
||||
\ "'[^']*' is not defined"
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_markdown_mdl_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ '.*MD013.*',
|
||||
\ '.*MD002.*',
|
||||
\ '.*MD029.*'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_python_flake8_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ '.*\[W293\]',
|
||||
\ '.*\[E501\]'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_php_phpmd_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ 'Avoid using short method names like.*',
|
||||
|
@ -79,10 +89,12 @@ else
|
|||
\ 'The class.*has.*public methods.*',
|
||||
\ 'The class.*lines of code'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_sh_bashate_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ 'Indent not multiple of 4'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_sh_shellcheck_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ '.*\[SC1001\]',
|
||||
|
@ -95,6 +107,7 @@ else
|
|||
\ '.*follow non-constant source',
|
||||
\ 'Not following:'
|
||||
\ ]}
|
||||
|
||||
autocmd BufNewFile,BufRead PKGBUILD,bash.bashrc,.bashrc let g:syntastic_quiet_messages = {"level":"warnings"}
|
||||
|
||||
let g:syntastic_check_on_wq = 0
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
let g:tcomment#rstrip_on_uncomment=2 "remove right-hand whitespace from all lines on uncomment
|
||||
"remove right-hand whitespace from all lines on uncomment
|
||||
let g:tcomment#rstrip_on_uncomment = 2
|
||||
|
|
|
@ -25,12 +25,20 @@
|
|||
|
||||
"use the '*' register as well as the the '+' register if it's available too
|
||||
set clipboard=unnamed
|
||||
if has('unnamedplus')|set clipboard+=unnamedplus|endif
|
||||
|
||||
if has('unnamedplus')
|
||||
set clipboard+=unnamedplus
|
||||
endif
|
||||
|
||||
"fancy mouse reporting with xterm2 fallback
|
||||
if !has('nvim')
|
||||
if has("mouse_sgr")|set ttymouse=sgr|else|set ttymouse=xterm2|endif
|
||||
if has("mouse_sgr")
|
||||
set ttymouse=sgr
|
||||
else
|
||||
set ttymouse=xterm2
|
||||
endif
|
||||
endif
|
||||
|
||||
set mouse=a "enables mouse functionality with extended capabilities
|
||||
|
||||
"8 colours in $TERM=linux, 256 elsewhere
|
||||
|
@ -39,10 +47,14 @@
|
|||
|
||||
"configure to primarily use utf8
|
||||
if has("multi_byte")
|
||||
if &termencoding == ""|let &termencoding = &encoding|endif
|
||||
if &termencoding == ""
|
||||
let &termencoding = &encoding
|
||||
endif
|
||||
|
||||
set encoding=utf-8
|
||||
setglobal fileencoding=utf-8
|
||||
endif
|
||||
|
||||
set fileformats=unix,dos,mac "set compatible line endings in order of preference
|
||||
"}}}
|
||||
|
||||
|
@ -91,7 +103,10 @@
|
|||
set ttimeout ttimeoutlen=100 "how long before timing out for terminal key codes
|
||||
|
||||
"create ~/.vim/swap if necessary, then use as default swap file location
|
||||
if !isdirectory($HOME.'/.vim/swap')|call mkdir($HOME.'/.vim/swap','p')|endif
|
||||
if exists('*mkdir') && !isdirectory($HOME.'/.vim/swap')
|
||||
call mkdir($HOME.'/.vim/swap','p')
|
||||
endif
|
||||
|
||||
set directory=$HOME/.vim/swap,.,/var/tmp,/tmp
|
||||
|
||||
"FUNCTIONS: {{{
|
||||
|
@ -101,9 +116,13 @@
|
|||
function s:MakeNewDir(fullpath, buf)
|
||||
if empty(getbufvar(a:buf,'&buftype')) && a:fullpath!~#'\v^\w+\:\/'
|
||||
let dirpath = fnamemodify(a:fullpath,':h')
|
||||
if !isdirectory(dirpath)|call mkdir(dirpath,'p')|endif
|
||||
|
||||
if !isdirectory(dirpath)
|
||||
call mkdir(dirpath,'p')
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
augroup WriteDir
|
||||
autocmd!
|
||||
autocmd BufWritePre * :call s:MakeNewDir(expand('<afile>'),+expand('<abuf>'))
|
||||
|
@ -121,26 +140,34 @@
|
|||
function s:SPResize33()
|
||||
sp|wincmd =|q
|
||||
endfunction
|
||||
|
||||
function s:sp33()
|
||||
sp|call s:SPResize33()|wincmd j
|
||||
endfunction
|
||||
|
||||
command! -buffer SP33 call s:sp33()
|
||||
|
||||
function s:sp66()
|
||||
sp|wincmd j|call s:SPResize33()
|
||||
endfunction
|
||||
|
||||
command! -buffer SP66 call s:sp66()
|
||||
|
||||
"functions to create a vertical split using 33% and 66% width
|
||||
function s:VSResize66()
|
||||
vs|wincmd =|q
|
||||
endfunction
|
||||
|
||||
function s:vs66()
|
||||
vs|call s:VSResize66()
|
||||
endfunction
|
||||
|
||||
command! -buffer VS66 call s:vs66()
|
||||
|
||||
function s:vs33()
|
||||
vs|wincmd h|call s:VSResize66()|wincmd l
|
||||
endfunction
|
||||
|
||||
command! -buffer VS33 call s:vs33()
|
||||
"}}}
|
||||
"}}}
|
||||
|
|
Loading…
Reference in a new issue