mirror of
https://github.com/prurigro/darkcloud-vimconfig.git
synced 2024-11-22 06:44:09 -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
|
@ -16,8 +16,9 @@ endif
|
||||||
|
|
||||||
"when enabled, this will override each file type default and disable all line breaks (default: 1)
|
"when enabled, this will override each file type default and disable all line breaks (default: 1)
|
||||||
if !exists("g:disablelinebreaks")
|
if !exists("g:disablelinebreaks")
|
||||||
let g:disablelinebreaks=1
|
let g:disablelinebreaks = 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (g:disablelinebreaks == 1)
|
if (g:disablelinebreaks == 1)
|
||||||
autocmd VimEnter * set textwidth=0
|
autocmd VimEnter * set textwidth=0
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -14,10 +14,21 @@ scriptencoding utf-8
|
||||||
|
|
||||||
"INITIALIZE PLUGINS: {{{
|
"INITIALIZE PLUGINS: {{{
|
||||||
"create missing plugin config files and directories
|
"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 exists('*mkdir') && !isdirectory(glob("~/.vim/tags_by_filetype"))
|
||||||
if !filereadable(glob("~/.vim/tags"))|new|silent e ~/.vim/tags|silent w|q|endif
|
call mkdir(glob("~/.vim/tags_by_filetype"),'p')
|
||||||
if !filereadable(glob("~/.vim/snippets.json"))|new|silent e ~/.vim/snippets.json|silent w|q|endif
|
endif
|
||||||
if !filereadable(glob("~/.vim/filetypes.vim"))|new|silent e ~/.vim/filetypes.vim|silent w|q|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/
|
"load plugins in vim/bundle/ and vim/bundle.user/
|
||||||
execute pathogen#infect('bundle/{}', 'bundle.user/{}')
|
execute pathogen#infect('bundle/{}', 'bundle.user/{}')
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
let g:use_emmet_complete_tag=1
|
let g:use_emmet_complete_tag = 1
|
||||||
let g:user_emmet_mode='a'
|
let g:user_emmet_mode = 'a'
|
||||||
|
|
||||||
if filereadable("~/.vim/snippets.json")
|
if filereadable("~/.vim/snippets.json")
|
||||||
let g:user_emmet_settings = webapi#json#decode(join(readfile(expand('~/.vim/snippets.json')), "\n"))
|
let g:user_emmet_settings = webapi#json#decode(join(readfile(expand('~/.vim/snippets.json')), "\n"))
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
let g:gundo_right=0
|
let g:gundo_right = 0
|
||||||
let g:gundo_width=35
|
let g:gundo_width = 35
|
||||||
let g:gundo_preview_height=10
|
let g:gundo_preview_height = 10
|
||||||
|
|
||||||
autocmd FileType gundo setlocal nocursorcolumn
|
autocmd FileType gundo setlocal nocursorcolumn
|
||||||
|
|
|
@ -4,4 +4,4 @@ map ? <Plug>(incsearch-backward)
|
||||||
map g/ <Plug>(incsearch-stay)
|
map g/ <Plug>(incsearch-stay)
|
||||||
|
|
||||||
"n and N behavioru is consistant
|
"n and N behavioru is consistant
|
||||||
let g:incsearch#consistent_n_direction=1
|
let g:incsearch#consistent_n_direction = 1
|
||||||
|
|
|
@ -32,7 +32,6 @@ function! LLFugitive()
|
||||||
return strlen(_) ? mark._ : ''
|
return strlen(_) ? mark._ : ''
|
||||||
endif
|
endif
|
||||||
catch
|
catch
|
||||||
|
|
||||||
endtry
|
endtry
|
||||||
|
|
||||||
return ''
|
return ''
|
||||||
|
@ -80,7 +79,7 @@ endfunction
|
||||||
|
|
||||||
"status bar config with and without powerline fonts (default: 0)
|
"status bar config with and without powerline fonts (default: 0)
|
||||||
if !exists("g:powerlinefonts")
|
if !exists("g:powerlinefonts")
|
||||||
let g:powerlinefonts=0
|
let g:powerlinefonts = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (g:powerlinefonts == 1)
|
if (g:powerlinefonts == 1)
|
||||||
|
|
|
@ -1,71 +1,81 @@
|
||||||
"autostart syntax checking when vim opens to a compatible filetype (default: 0)
|
"autostart syntax checking when vim opens to a compatible filetype (default: 0)
|
||||||
if !exists("g:autostartchecker")
|
if !exists("g:autostartchecker")
|
||||||
let g:autostartchecker=0
|
let g:autostartchecker = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if &diff
|
if &diff
|
||||||
let g:autostartchecker=0
|
let g:autostartchecker = 0
|
||||||
else
|
else
|
||||||
if (g:autostartchecker == 1)
|
if (g:autostartchecker == 1)
|
||||||
let g:syntastic_mode_map={
|
let g:syntastic_mode_map = {
|
||||||
\ 'mode':'active',
|
\ 'mode':'active',
|
||||||
\ 'active_filetypes':[],
|
\ 'active_filetypes':[],
|
||||||
\ 'passive_filetypes':[]
|
\ 'passive_filetypes':[]
|
||||||
\ }
|
\ }
|
||||||
let g:syntastic_check_on_open=1
|
|
||||||
|
let g:syntastic_check_on_open = 1
|
||||||
else
|
else
|
||||||
let g:syntastic_mode_map={
|
let g:syntastic_mode_map = {
|
||||||
\ 'mode':'passive',
|
\ 'mode':'passive',
|
||||||
\ 'active_filetypes':[],
|
\ 'active_filetypes':[],
|
||||||
\ 'passive_filetypes':[]
|
\ 'passive_filetypes':[]
|
||||||
\ }
|
\ }
|
||||||
let g:syntastic_check_on_open=0
|
|
||||||
|
let g:syntastic_check_on_open = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"configure warnings/errors that should be silenced by module
|
"configure warnings/errors that should be silenced by module
|
||||||
let g:syntastic_less_lessc_quiet_messages={
|
let g:syntastic_less_lessc_quiet_messages = {
|
||||||
\ 'regex':[
|
\ 'regex':[
|
||||||
\ 'NameError:.* is undefined',
|
\ 'NameError:.* is undefined',
|
||||||
\ 'FileError:.*'
|
\ 'FileError:.*'
|
||||||
\ ]}
|
\ ]}
|
||||||
let g:syntastic_scss_sass_quiet_messages={
|
|
||||||
|
let g:syntastic_scss_sass_quiet_messages = {
|
||||||
\ 'regex':[
|
\ 'regex':[
|
||||||
\ 'File to import not found or unreadable.*'
|
\ 'File to import not found or unreadable.*'
|
||||||
\ ]}
|
\ ]}
|
||||||
let g:syntastic_java_javac_quiet_messages={
|
|
||||||
|
let g:syntastic_java_javac_quiet_messages = {
|
||||||
\ 'regex':[
|
\ 'regex':[
|
||||||
\ 'cannot find symbol.*',
|
\ 'cannot find symbol.*',
|
||||||
\ 'method does not override or implement a method from a supertype.*',
|
\ 'method does not override or implement a method from a supertype.*',
|
||||||
\ 'package [^\ ]* does not exist.*'
|
\ 'package [^\ ]* does not exist.*'
|
||||||
\ ]}
|
\ ]}
|
||||||
let g:syntastic_javascript_eslint_quiet_messages={
|
|
||||||
|
let g:syntastic_javascript_eslint_quiet_messages = {
|
||||||
\ 'regex':[
|
\ 'regex':[
|
||||||
\ '.* is defined but never used',
|
\ '.* is defined but never used',
|
||||||
\ "'[^']*' is not defined",
|
\ "'[^']*' is not defined",
|
||||||
\ 'Missing "use strict" statement',
|
\ 'Missing "use strict" statement',
|
||||||
\ 'Unexpected [^ ]* statement.*'
|
\ 'Unexpected [^ ]* statement.*'
|
||||||
\ ]}
|
\ ]}
|
||||||
let g:syntastic_javascript_jshint_quiet_messages={
|
|
||||||
|
let g:syntastic_javascript_jshint_quiet_messages = {
|
||||||
\ 'regex':[
|
\ 'regex':[
|
||||||
\ 'Expected an assignment or function call and instead saw an expression.'
|
\ 'Expected an assignment or function call and instead saw an expression.'
|
||||||
\ ]}
|
\ ]}
|
||||||
let g:syntastic_javascript_standard_quiet_messages={
|
|
||||||
|
let g:syntastic_javascript_standard_quiet_messages = {
|
||||||
\ 'regex':[
|
\ 'regex':[
|
||||||
\ '.* is defined but never used',
|
\ '.* is defined but never used',
|
||||||
\ "'[^']*' is not defined"
|
\ "'[^']*' is not defined"
|
||||||
\ ]}
|
\ ]}
|
||||||
let g:syntastic_markdown_mdl_quiet_messages={
|
|
||||||
|
let g:syntastic_markdown_mdl_quiet_messages = {
|
||||||
\ 'regex':[
|
\ 'regex':[
|
||||||
\ '.*MD013.*',
|
\ '.*MD013.*',
|
||||||
\ '.*MD002.*',
|
\ '.*MD002.*',
|
||||||
\ '.*MD029.*'
|
\ '.*MD029.*'
|
||||||
\ ]}
|
\ ]}
|
||||||
let g:syntastic_python_flake8_quiet_messages={
|
|
||||||
|
let g:syntastic_python_flake8_quiet_messages = {
|
||||||
\ 'regex':[
|
\ 'regex':[
|
||||||
\ '.*\[W293\]',
|
\ '.*\[W293\]',
|
||||||
\ '.*\[E501\]'
|
\ '.*\[E501\]'
|
||||||
\ ]}
|
\ ]}
|
||||||
let g:syntastic_php_phpmd_quiet_messages={
|
|
||||||
|
let g:syntastic_php_phpmd_quiet_messages = {
|
||||||
\ 'regex':[
|
\ 'regex':[
|
||||||
\ 'Avoid using short method names like.*',
|
\ 'Avoid using short method names like.*',
|
||||||
\ 'Avoid variables with short names like.*',
|
\ 'Avoid variables with short names like.*',
|
||||||
|
@ -79,11 +89,13 @@ else
|
||||||
\ 'The class.*has.*public methods.*',
|
\ 'The class.*has.*public methods.*',
|
||||||
\ 'The class.*lines of code'
|
\ 'The class.*lines of code'
|
||||||
\ ]}
|
\ ]}
|
||||||
let g:syntastic_sh_bashate_quiet_messages={
|
|
||||||
|
let g:syntastic_sh_bashate_quiet_messages = {
|
||||||
\ 'regex':[
|
\ 'regex':[
|
||||||
\ 'Indent not multiple of 4'
|
\ 'Indent not multiple of 4'
|
||||||
\ ]}
|
\ ]}
|
||||||
let g:syntastic_sh_shellcheck_quiet_messages={
|
|
||||||
|
let g:syntastic_sh_shellcheck_quiet_messages = {
|
||||||
\ 'regex':[
|
\ 'regex':[
|
||||||
\ '.*\[SC1001\]',
|
\ '.*\[SC1001\]',
|
||||||
\ '.*\[SC2015\]',
|
\ '.*\[SC2015\]',
|
||||||
|
@ -95,17 +107,18 @@ else
|
||||||
\ '.*follow non-constant source',
|
\ '.*follow non-constant source',
|
||||||
\ 'Not following:'
|
\ 'Not following:'
|
||||||
\ ]}
|
\ ]}
|
||||||
autocmd BufNewFile,BufRead PKGBUILD,bash.bashrc,.bashrc let g:syntastic_quiet_messages={"level":"warnings"}
|
|
||||||
|
|
||||||
let g:syntastic_check_on_wq=0
|
autocmd BufNewFile,BufRead PKGBUILD,bash.bashrc,.bashrc let g:syntastic_quiet_messages = {"level":"warnings"}
|
||||||
let g:syntastic_always_populate_loc_list=1
|
|
||||||
let g:syntastic_auto_loc_list=1
|
let g:syntastic_check_on_wq = 0
|
||||||
let g:syntastic_loc_list_height=5
|
let g:syntastic_always_populate_loc_list = 1
|
||||||
|
let g:syntastic_auto_loc_list = 1
|
||||||
|
let g:syntastic_loc_list_height = 5
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"function to enable syntastic and set check_on_open on
|
"function to enable syntastic and set check_on_open on
|
||||||
function s:SyntasticToggleOn()
|
function s:SyntasticToggleOn()
|
||||||
let g:syntastic_check_on_open=1
|
let g:syntastic_check_on_open = 1
|
||||||
|
|
||||||
if (g:syntastic_mode_map.mode == "passive")
|
if (g:syntastic_mode_map.mode == "passive")
|
||||||
SyntasticToggleMode
|
SyntasticToggleMode
|
||||||
|
@ -116,7 +129,7 @@ command! -buffer SyntasticToggleOn call s:SyntasticToggleOn()
|
||||||
|
|
||||||
"function to disable syntastic and set check_on_open off
|
"function to disable syntastic and set check_on_open off
|
||||||
function s:SyntasticToggleOff()
|
function s:SyntasticToggleOff()
|
||||||
let g:syntastic_check_on_open=0
|
let g:syntastic_check_on_open = 0
|
||||||
|
|
||||||
if (g:syntastic_mode_map.mode == "active")
|
if (g:syntastic_mode_map.mode == "active")
|
||||||
SyntasticToggleMode
|
SyntasticToggleMode
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
"autostart tagbar when vim opens to a compatible filetype (default: 0)
|
"autostart tagbar when vim opens to a compatible filetype (default: 0)
|
||||||
if !exists("g:autostarttagbar")
|
if !exists("g:autostarttagbar")
|
||||||
let g:autostarttagbar=0
|
let g:autostarttagbar = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !&diff && (g:autostarttagbar == 1)
|
if !&diff && (g:autostarttagbar == 1)
|
||||||
autocmd VimEnter * nested :call tagbar#autoopen(1)
|
autocmd VimEnter * nested :call tagbar#autoopen(1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:tagbar_sort=0
|
let g:tagbar_sort = 0
|
||||||
let g:tagbar_compact=1
|
let g:tagbar_compact = 1
|
||||||
let g:tagbar_singleclick=1
|
let g:tagbar_singleclick = 1
|
||||||
let g:tagbar_width=35
|
let g:tagbar_width = 35
|
||||||
let g:tagbar_autofocus=1
|
let g:tagbar_autofocus = 1
|
||||||
|
|
||||||
autocmd FileType tagbar setlocal nocursorcolumn
|
autocmd FileType tagbar setlocal nocursorcolumn
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
let g:tcommand#include_history=0
|
let g:tcommand#include_history = 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
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
let g:easytags_suppress_ctags_warning=1
|
let g:easytags_suppress_ctags_warning = 1
|
||||||
|
|
||||||
if filereadable(glob("~/.vim/tags"))
|
if filereadable(glob("~/.vim/tags"))
|
||||||
let g:easytags_file='~/.vim/tags'
|
let g:easytags_file = '~/.vim/tags'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if isdirectory(glob("~/.vim/tags_by_filetype"))
|
if isdirectory(glob("~/.vim/tags_by_filetype"))
|
||||||
let g:easytags_by_filetype='~/.vim/tags_by_filetype'
|
let g:easytags_by_filetype = '~/.vim/tags_by_filetype'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"prevent automatically generating the tagfile and syntax highlighting tags (default: 0)
|
"prevent automatically generating the tagfile and syntax highlighting tags (default: 0)
|
||||||
if !exists("g:disableautotags")
|
if !exists("g:disableautotags")
|
||||||
let g:disableautotags=0
|
let g:disableautotags = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (g:disableautotags == 1)
|
if (g:disableautotags == 1)
|
||||||
let g:easytags_auto_update=0
|
let g:easytags_auto_update = 0
|
||||||
let g:easytags_auto_highlight=0
|
let g:easytags_auto_highlight = 0
|
||||||
else
|
else
|
||||||
let g:easytags_auto_update=1
|
let g:easytags_auto_update = 1
|
||||||
let g:easytags_auto_highlight=1
|
let g:easytags_auto_highlight = 1
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
let g:signify_sign_add='+'
|
let g:signify_sign_add = '+'
|
||||||
let g:signify_sign_change='!'
|
let g:signify_sign_change = '!'
|
||||||
let g:signify_sign_delete='-'
|
let g:signify_sign_delete = '-'
|
||||||
let g:signify_sign_delete_first_line='~'
|
let g:signify_sign_delete_first_line = '~'
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
"autostart filer when vim opens to an empty buffer (default: 1)
|
"autostart filer when vim opens to an empty buffer (default: 1)
|
||||||
if !exists("g:autostartfiler")
|
if !exists("g:autostartfiler")
|
||||||
let g:autostartfiler=1
|
let g:autostartfiler = 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (g:autostartfiler == 1)
|
if (g:autostartfiler == 1)
|
||||||
autocmd VimEnter * if !argc() | VimFiler -quit -project | endif
|
autocmd VimEnter * if !argc() | VimFiler -quit -project | endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:vimfiler_as_default_explorer=1
|
let g:vimfiler_as_default_explorer = 1
|
||||||
let g:vimfiler_safe_mode_by_default=0
|
let g:vimfiler_safe_mode_by_default = 0
|
||||||
let g:vimfiler_enable_auto_cd=1
|
let g:vimfiler_enable_auto_cd = 1
|
||||||
|
|
||||||
let g:vimfiler_tree_indentation=2
|
let g:vimfiler_tree_indentation = 2
|
||||||
let g:vimfiler_explorer_columns='type:time'
|
let g:vimfiler_explorer_columns = 'type:time'
|
||||||
let g:vimfiler_tree_closed_icon='▸' "['▶', '▼'], ['▸', '▾'], ['▷', '◢']
|
let g:vimfiler_tree_closed_icon = '▸' "['▶', '▼'], ['▸', '▾'], ['▷', '◢']
|
||||||
let g:vimfiler_tree_opened_icon='▾'
|
let g:vimfiler_tree_opened_icon = '▾'
|
||||||
let g:vimfiler_file_icon='-'
|
let g:vimfiler_file_icon = '-'
|
||||||
let g:vimfiler_marked_file_icon='+'
|
let g:vimfiler_marked_file_icon = '+'
|
||||||
|
|
||||||
"edit files by double clicking them, and justify the cursor on the left
|
"edit files by double clicking them, and justify the cursor on the left
|
||||||
autocmd FileType vimfiler setlocal nonumber nocursorcolumn
|
autocmd FileType vimfiler setlocal nonumber nocursorcolumn
|
||||||
|
|
|
@ -25,12 +25,20 @@
|
||||||
|
|
||||||
"use the '*' register as well as the the '+' register if it's available too
|
"use the '*' register as well as the the '+' register if it's available too
|
||||||
set clipboard=unnamed
|
set clipboard=unnamed
|
||||||
if has('unnamedplus')|set clipboard+=unnamedplus|endif
|
|
||||||
|
if has('unnamedplus')
|
||||||
|
set clipboard+=unnamedplus
|
||||||
|
endif
|
||||||
|
|
||||||
"fancy mouse reporting with xterm2 fallback
|
"fancy mouse reporting with xterm2 fallback
|
||||||
if !has('nvim')
|
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
|
endif
|
||||||
|
|
||||||
set mouse=a "enables mouse functionality with extended capabilities
|
set mouse=a "enables mouse functionality with extended capabilities
|
||||||
|
|
||||||
"8 colours in $TERM=linux, 256 elsewhere
|
"8 colours in $TERM=linux, 256 elsewhere
|
||||||
|
@ -39,10 +47,14 @@
|
||||||
|
|
||||||
"configure to primarily use utf8
|
"configure to primarily use utf8
|
||||||
if has("multi_byte")
|
if has("multi_byte")
|
||||||
if &termencoding == ""|let &termencoding = &encoding|endif
|
if &termencoding == ""
|
||||||
|
let &termencoding = &encoding
|
||||||
|
endif
|
||||||
|
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
setglobal fileencoding=utf-8
|
setglobal fileencoding=utf-8
|
||||||
endif
|
endif
|
||||||
|
|
||||||
set fileformats=unix,dos,mac "set compatible line endings in order of preference
|
set fileformats=unix,dos,mac "set compatible line endings in order of preference
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
|
@ -72,7 +84,7 @@
|
||||||
set list listchars=tab:>-,trail:- "display tabs as: >--- and trailing spaces as: -
|
set list listchars=tab:>-,trail:- "display tabs as: >--- and trailing spaces as: -
|
||||||
set showmatch "show matching open bracket when closed bracket is inserted
|
set showmatch "show matching open bracket when closed bracket is inserted
|
||||||
set matchtime=5 "the amount of time before the matching bracket will highlight
|
set matchtime=5 "the amount of time before the matching bracket will highlight
|
||||||
let &showbreak="" "character to prepend to wrapped lines when linewrapping is enabled
|
let &showbreak = "" "character to prepend to wrapped lines when linewrapping is enabled
|
||||||
|
|
||||||
"enable tab completion in command mode and configure how it handles extensions
|
"enable tab completion in command mode and configure how it handles extensions
|
||||||
set completeopt=longest,menuone
|
set completeopt=longest,menuone
|
||||||
|
@ -91,7 +103,10 @@
|
||||||
set ttimeout ttimeoutlen=100 "how long before timing out for terminal key codes
|
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
|
"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
|
set directory=$HOME/.vim/swap,.,/var/tmp,/tmp
|
||||||
|
|
||||||
"FUNCTIONS: {{{
|
"FUNCTIONS: {{{
|
||||||
|
@ -100,10 +115,14 @@
|
||||||
if !exists('*s:MakeNewDir')
|
if !exists('*s:MakeNewDir')
|
||||||
function s:MakeNewDir(fullpath, buf)
|
function s:MakeNewDir(fullpath, buf)
|
||||||
if empty(getbufvar(a:buf,'&buftype')) && a:fullpath!~#'\v^\w+\:\/'
|
if empty(getbufvar(a:buf,'&buftype')) && a:fullpath!~#'\v^\w+\:\/'
|
||||||
let dirpath=fnamemodify(a:fullpath,':h')
|
let dirpath = fnamemodify(a:fullpath,':h')
|
||||||
if !isdirectory(dirpath)|call mkdir(dirpath,'p')|endif
|
|
||||||
|
if !isdirectory(dirpath)
|
||||||
|
call mkdir(dirpath,'p')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
augroup WriteDir
|
augroup WriteDir
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd BufWritePre * :call s:MakeNewDir(expand('<afile>'),+expand('<abuf>'))
|
autocmd BufWritePre * :call s:MakeNewDir(expand('<afile>'),+expand('<abuf>'))
|
||||||
|
@ -121,26 +140,34 @@
|
||||||
function s:SPResize33()
|
function s:SPResize33()
|
||||||
sp|wincmd =|q
|
sp|wincmd =|q
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function s:sp33()
|
function s:sp33()
|
||||||
sp|call s:SPResize33()|wincmd j
|
sp|call s:SPResize33()|wincmd j
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
command! -buffer SP33 call s:sp33()
|
command! -buffer SP33 call s:sp33()
|
||||||
|
|
||||||
function s:sp66()
|
function s:sp66()
|
||||||
sp|wincmd j|call s:SPResize33()
|
sp|wincmd j|call s:SPResize33()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
command! -buffer SP66 call s:sp66()
|
command! -buffer SP66 call s:sp66()
|
||||||
|
|
||||||
"functions to create a vertical split using 33% and 66% width
|
"functions to create a vertical split using 33% and 66% width
|
||||||
function s:VSResize66()
|
function s:VSResize66()
|
||||||
vs|wincmd =|q
|
vs|wincmd =|q
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function s:vs66()
|
function s:vs66()
|
||||||
vs|call s:VSResize66()
|
vs|call s:VSResize66()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
command! -buffer VS66 call s:vs66()
|
command! -buffer VS66 call s:vs66()
|
||||||
|
|
||||||
function s:vs33()
|
function s:vs33()
|
||||||
vs|wincmd h|call s:VSResize66()|wincmd l
|
vs|wincmd h|call s:VSResize66()|wincmd l
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
command! -buffer VS33 call s:vs33()
|
command! -buffer VS33 call s:vs33()
|
||||||
"}}}
|
"}}}
|
||||||
"}}}
|
"}}}
|
||||||
|
|
Loading…
Reference in a new issue