Tweaked the update script to drop the user variables from vimrc into

vimrc.user when it's created. a new user-based config file can be used
to specify the location of the project folder without altering vimrc, if
it's a symlink and bound to bump into conflicts as changes are made. The
README was updated to reflect a few of the recent changes. The tagbar
now outputs to the lightline statusline if there's anything to report.
A new variable was added to choose whether to always start with the
tagbar enabled if the format is compatible, or use the older behaviour,
where it would only appear when triggered. The default is to enable it 24/7.
This commit is contained in:
Kevin 2014-04-08 03:39:10 -04:00
parent 1d19dacfa9
commit a7e95b25ac
5 changed files with 197 additions and 142 deletions

View file

@ -6,7 +6,7 @@
2. **Git** (__optional__): Required to clone and update the repository, and pull the plugins as submodules.
3. **CTags** (__optional__): Available @ <http://ctags.sourceforge.net>, place in __$PATH__ or the vim folder to use the tagbar or extended C omni/auto-completion.
4. **Grep and Find** (__optional__): Have grep, fgrep, egrep and agrep ([windows binaries](http://gnuwin32.sourceforge.net/packages/grep.htm)), and find and xargs ([windows binaries](http://gnuwin32.sourceforge.net/packages/findutils.htm)) in $PATH or the vim folder to use the Grep plugin commands.
6. **Powerline Fonts** (__optional__): Required for an extended look/feel using lightline, otherwise it should be toggled off in the vimrc.
6. **Powerline Fonts** (__optional__): Required for a better looking lightline statusbar and should be disabled if they're not available ([powerline-patched fonts](https://github.com/Lokaltog/powerline-fonts)).
5. **Bash** (__optional__): Required to use the update and ctags generation scripts, both of which can be run with the commands listed within.
## Features ##
@ -22,18 +22,27 @@
* `git clone https://github.com/prurigro/darkcloud-vimconfig.git`
* `sh darkcloud-vimconfig/update`
* Note: The __update__ script requires bash, but you can enter the __darkcloud-vimconfig/__ folder and run: `git submodule update --init` to install the plugins manually if it's not available.
* Note: The __update__ script requires bash, but if it's not available you can enter the __darkcloud-vimconfig/__ folder and run: `git submodule update --init` to install the plugins manually, then create __vim/vimrc.user__ and remember to run: `:Helptags` once everything else is running.
2. Open vim and run: `:version` to find the values for "user vimrc file" for a single-user install and "system vimrc file" for a system-wide install, then copy the vimrc file from `darkcloud-vimconfig/` to one of these locations.
2. If you don't know where vim expects to find your vimrc, start vim and run: `:version` to find the values "user vimrc file" (for a single-user install) and "system vimrc file" (for a system-wide install). T
3. Open the vimrc you just installed and either edit the variables in the "__USER CONFIG SETTINGS__" section, or (preferably) copy them to __vim/vimrc.user__ and edit them there:
3. Copy or symlink the vimrc file from `darkcloud-vimconfig/vimrc` to one of the locations vim expects to find it, based on whether you want a local or system-wide install, then choose one of the following:
* **s:darkcloudpath**: Set to the location of the darkcloud-vimconfig folder. (__default__: __/etc/darkcloud-vimconfig__)
* Edit the __g:darkcloudpath__ variable in the vimrc file iteself, pointing it to the location you're keeping the __darkcloud-vimconfig__ repo folder.
* Create a file @ __~/.vim/darkcloud-path.vim__ and in it put the following: `let g:darkcloudpath="/etc/darkcloud-vimconfig"`, but replacing __"/etc/darkcloud-vimconfig"__ with the path to the __darkcloud-vimconfig__ repo folder.
* Place __darkcloud-vimconfig__ in the default location @ __/etc/darkcloud-vimconfig__.
* Create your own vimrc and have that set the __g:darkcloudpath__ variable before sourcing the included vimrc.
* Come up with some other solution that fits your setup better than these. :)
4. Open the vimrc you just installed and either edit the variables in the "__USER CONFIG SETTINGS__" section, or (preferably) copy them to __vim/vimrc.user__ and edit them there:
* **g:darkcloudpath**: Set to the location of the darkcloud-vimconfig folder. (__default__: __/etc/darkcloud-vimconfig__)
* **g:autostartchecker**: 1 = Check syntax once an appropriate file is loaded | 0 = Check syntax only after syntax checking is toggled on (__default__: 1)
* **g:autostarttagbar**: 1 = Have the tagbar load automatically when a compatible format is run | 0 = The tagbar will stay hidden until triggered on demand with its toggle
* **g:powerlinefonts**: 1 = Render the statusline using characters available with powerline-patched fonts | 0 = Render the statusbar with less attractive but more compatible characters available in all fonts (__default__: 0)
* **guifont**: Set to the name of the font you would like to use with gVim followed by the size, making sure to escape spaces and that a powerline-compatible font is selected if the above option is set to 1. (__default__: Droid\ Sans\ Mono\ 12)
4. Install ctags (http://ctags.sourceforge.net) to your system using a package and ensure it can be accessed in __$PATH__, or install support for vim exclusively by copying the ctags binary to the __darkcloud-vimconfig/vim__ folder.
5. Install ctags (http://ctags.sourceforge.net) to your system using a package and ensure it can be accessed in __$PATH__, or install support for vim exclusively by copying the ctags binary to the __darkcloud-vimconfig/vim__ folder.
## Configuration ##
@ -41,15 +50,14 @@
* **Custom Plugins**: Pathogen compatible plugins can be cloned or extracted to "darkcloud-vimconfig/vim/bundle.user/", or a folder named "bundle" or "bundle.user" in any of the folders in the runtimepath.
* **Custom Snippets**: To add or override Emmet snippets, create __~/.vim/snippets.json__ and add your own definitions using json like shown in the [Emmet Documentation](http://docs.emmet.io/customization/snippets/).
* **File Associations**: To use the file manager in vim to run files with external programs, create "~/.vim/filetypes.vim" and on each line, write an association between a file extension and the program to launch files of that type that looks like: `call vimfiler#set_execute_file('mp4','xdg-open')`.
* **Update Script**: (requires: bash+git) Update the project and its submodules using the same "update" script in the root of darkcloud-vimconfig as the one used to download the plugins.
* **Update Script**: (requires: bash+git) Use this to update the project and submodules, as well as handle any required maintenance, generate docs from the pathogen plugins and create missing config scripts with preset values.
* **Generate System Tags**: (requires: bash+ctags) Generate a list of ctags for your system libraries in __/usr/include__ and __/usr/local/include__ as well as any folders passed as arguments by running the __gentags__ script.
* **Fix TMux Keys**: (requires: tmux): Add the following settings to tmux to ensure the colour scheme gets loaded and all the keyboard combinations work: `set -g default-terminal "screen-256color` and `set-window-option -g xterm-keys on`
## Notes ##
* **Runtimepath**: To find the runtimepath locations currently set, run the following in vim: `:verbose set runtimepath`.
* **Reference**: Type `??`, `?>` and '?<' to toggle sidebars with different reference topics.
* **Unique Key Bindings**: You can find a list of the bindings added by darkcloud-vimconfig, as well as a few of the ones added by plugins in __vim/config/keyboard.vim__.
* **Key Bindings**: You can find a list of the bindings added by darkcloud-vimconfig, as well as a few of the ones added by plugins in __vim/config/keyboard.vim__.
* **Vim Quick Reference**: Type __??__, __?>__ and __?<__ to toggle sidebars with three styles of quick reference material different reference topics.
## Credits ##

9
update
View file

@ -4,7 +4,14 @@
cd "${0%/*}"
# create the user vimrc file in the directory if it doesn't already exist
if [ ! -e vim/vimrc.user ]; then [[ -w vim ]] && touch vim/vimrc.user; fi
if [ ! -e vim/vimrc.user ]; then
if [ -d vim ] && [ -w vim ]; then
echo -e '"Syntax Checking Autostart: (1:start toggled on | 0: start toggled off)\nlet g:autostartchecker=1\n' >> vim/vimrc.user
echo -e '"Vim Starts With The Tagbar Open: (1:start open | 0:start closed)\nlet g:autostarttagbar=1\n' >> vim/vimrc.user
echo -e '"Powerline Font Support: (1:enabled | 0:disabled)\nlet g:powerlinefonts=1\n' >> vim/vimrc.user
echo -e '"GVim Font Selection: (term font set by terminal)\nset guifont=Droid\ Sans\ Mono\ 12' >> vim/vimrc.user
fi
fi
# update the repository and submodules
git pull origin

View file

@ -174,8 +174,6 @@
" <F8> | (A) -> show heading TOC instead of the taglist
"
" (markdown toc)
" q | (A) -> close the toc
" <F8> | (A) -> close the toc
" <Space> | (A) -> select heading but remain in toc
" <LClick><LClick> | (A) -> select heading to edit
" <Left> | (A) -> up
@ -463,10 +461,10 @@
"FILETYPE SPECIFIC MAPPINGS: {{{
"vimdiff
autocmd FilterWritePre * if &diff|nnoremap <silent><expr> <Leader><> ':diffu<CR>'|endif
autocmd FilterWritePre * if &diff|nnoremap <silent><expr> <Leader>>< ':diffu<CR>'|endif
autocmd FilterWritePre * if &diff|nnoremap <Leader>> dp|endif
autocmd FilterWritePre * if &diff|nnoremap <Leader>< do|endif
autocmd FilterWritePre * if &diff|nnoremap <buffer> <silent><expr> <Leader><> ':diffu<CR>'|endif
autocmd FilterWritePre * if &diff|nnoremap <buffer> <silent><expr> <Leader>>< ':diffu<CR>'|endif
autocmd FilterWritePre * if &diff|nnoremap <buffer> <Leader>> dp|endif
autocmd FilterWritePre * if &diff|nnoremap <buffer> <Leader>< do|endif
autocmd FilterWritePre * if &diff|cabbrev q qall|endif
autocmd FilterWritePre * if &diff|cabbrev q! qall!|endif
@ -477,10 +475,9 @@
autocmd FileType help nnoremap <buffer> <silent><expr> ?< ':q<CR>'
"markdown launch table of contents instead of the tagbar
autocmd FileType mkd noremap <buffer> <silent><expr> <F8> ':Toc<CR><C-w>L'
autocmd FileType mkd noremap <buffer> <silent><expr> <F8> ':Toch<CR>'
"markdown table of contents
autocmd FileType qf noremap <buffer> <silent><expr> q ':q<CR>'
autocmd FileType qf noremap <buffer> <silent><expr> <F8> ':q<CR>'
autocmd FileType qf noremap <buffer> <Space> <CR><C-w>p
autocmd FileType qf noremap <buffer> <2-LeftMouse> <CR>
@ -491,10 +488,10 @@
"vimfiler
autocmd FileType vimfiler nmap <buffer> <2-LeftMouse> <Plug>(vimfiler_edit_file)
autocmd FileType vimfiler nmap <Right> l
autocmd FileType vimfiler nmap <Left> h
autocmd FileType vimfiler nmap ' e
autocmd FileType vimfiler nmap n q
autocmd FileType vimfiler nmap <buffer> <Right> l
autocmd FileType vimfiler nmap <buffer> <Left> h
autocmd FileType vimfiler nmap <buffer> ' e
autocmd FileType vimfiler nmap <buffer> n q
"markdown toc and vimfiler
autocmd FileType qf,vimfiler nmap <buffer> <LeftMouse> <LeftMouse>0
@ -505,10 +502,10 @@
autocmd FileType gundo nmap <buffer> <LeftMouse> <LeftMouse>0l
autocmd FileType gundo nmap <buffer> <MiddleMouse> <LeftMouse>
autocmd FileType gundo nmap <buffer> <RightMouse> <LeftMouse>
autocmd FileType gundo nmap <Right> <Down>
autocmd FileType gundo nmap l j
autocmd FileType gundo nmap <Left> <Up>
autocmd FileType gundo nmap h k
autocmd FileType gundo nmap <buffer> <Right> <Down>
autocmd FileType gundo nmap <buffer> l j
autocmd FileType gundo nmap <buffer> <Left> <Up>
autocmd FileType gundo nmap <buffer> h k
"breeze compatible formats
autocmd BufNewFile,BufRead *.html,*.htm,*.xhtml,*.xml,*.php,*.aspx nmap <buffer> <silent><expr> _ ':BreezePrevSibling<CR>'
@ -522,25 +519,26 @@
"DISABLED MAPPINGS: {{{
"remove incompatible toggles from specific filetypes
autocmd Filetype qf,gundo,vimfiler noremap <F1> <Nop>
autocmd Filetype qf,ggundo,vimfiler,help noremap <F2> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <F3> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <C-Up> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <C-k> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <C-Down> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <C-j> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <C-Right> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <C-l> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <C-Left> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <C-h> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <S-Up> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <S-k> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <S-Down> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <S-j> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <S-Right> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <S-l> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <S-Left> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <S-h> <Nop>
autocmd Filetype qf,gundo,vimfiler noremap <buffer> <F1> <Nop>
autocmd Filetype qf,ggundo,vimfiler,tagbar,help noremap <buffer> <F2> <Nop>
autocmd Filetype qf,ggundo,vimfiler,tagbar noremap <buffer> <F3> <Nop>
autocmd Filetype qf,ggundo,vimfiler,tagbar,help noremap <buffer> <F4> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <C-Up> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <C-k> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <C-Down> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <C-j> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <C-Right> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <C-l> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <C-Left> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <C-h> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <S-Up> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <S-k> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <S-Down> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <S-j> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <S-Right> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <S-l> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <S-Left> <Nop>
autocmd Filetype qf,ggundo,vimfiler noremap <buffer> <S-h> <Nop>
"}}}
"ALIASES: COMMAND SHORTCUTS {{{

View file

@ -28,6 +28,55 @@
endif
"}}}
"GUNDO: {{{
let g:gundo_right=1
let g:gundo_width=35
let g:gundo_preview_height=10
autocmd FileType gundo setlocal nocursorcolumn
"}}}
"MARKDOWN VIM MODE: {{{
let g:vim_markdown_folding_disabled=0
let g:vim_markdown_initial_foldlevel=2
"}}}
"NEOCOMPLCACHE AUTOCOMPLETION PLUGIN: {{{
let g:neocomplcache_enable_at_startup=1
let g:neocomplcache_enable_smart_case=1
let g:neocomplcache_min_syntax_length=3
let g:neocomplcache_enable_insert_char_pre=1
let g:neocomplcache_enable_underbar_completion=1
let g:neocomplcache_wildcard_characters={'_': '-'}
if !exists('g:neocomplcache_omni_patterns')
let g:neocomplcache_omni_patterns = {}
endif
if !exists('g:neocomplcache_force_omni_patterns')
let g:neocomplcache_force_omni_patterns = {}
endif
let g:neocomplcache_omni_patterns.c='[^.[:digit:] *\t]\%(\.\|->\)\%(\h\w*\)\?'
let g:neocomplcache_omni_patterns.cpp='[^.[:digit:] *\t]\%(\.\|->\)\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
let g:neocomplcache_omni_patterns.xml='<[^>]*'
let g:neocomplcache_omni_patterns.html='<[^>]*'
let g:neocomplcache_omni_patterns.xhtml='<[^>]*'
let g:neocomplcache_omni_patterns.markdown='<[^>]*'
let g:neocomplcache_omni_patterns.css='^\s\+\w+\|\w+[):;]?\s\+\|[@!]'
let g:neocomplcache_omni_patterns.less='^\s\+\w+\|\w+[):;]?\s\+\|[@!]'
let g:neocomplcache_omni_patterns.javascript='[^. \t]\.\%(\h\w*\)\?'
let g:neocomplcache_omni_patterns.python='[^. *\t]\.\h\w*\|\h\w*::'
let g:neocomplcache_omni_patterns.ruby='[^. *\t]\.\w*\|\h\w*::'
let g:neocomplcache_omni_patterns.php='[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
let g:neocomplcache_omni_patterns.actionscript='[^. \t][.:]\h\w*'
let g:neocomplcache_omni_patterns.python3='[^. *\t]\.\h\w*\|\h\w*::'
let g:neocomplcache_omni_patterns.go='\h\w*\%.'
let g:neocomplcache_omni_patterns.perl='\h\w*->\h\w*\|\h\w*::'
let g:neocomplcache_omni_patterns.java='\%(\h\w*\|)\)\.'
let g:neocomplcache_omni_patterns.objc='\h\w\+\|\h\w*\%(\.\|->\)\h\w*'
let g:neocomplcache_omni_patterns.objj='[\[ \.]\w\+$\|:\w*$'
"}}}
"SIGNIFY: {{{
let g:signify_sign_add = '+'
let g:signify_sign_change = '!'
@ -35,12 +84,62 @@
let g:signify_sign_delete_first_line = '~'
"}}}
"GUNDO: {{{
let g:gundo_right=1
let g:gundo_width=35
let g:gundo_preview_height=10
"SYNTASTIC: {{{
"syntax checker autostart default: 1
if !exists("g:autostartchecker")
let g:autostartchecker=1
endif
autocmd FileType gundo setlocal nocursorcolumn
if (g:autostartchecker == 1)
let g:syntastic_mode_map = {'mode':'active','active_filetypes':[],'passive_filetypes':[]}
let g:syntastic_check_on_open=1
else
let g:syntastic_mode_map = {'mode':'passive','active_filetypes':[],'passive_filetypes':[]}
let g:syntastic_check_on_open=0
endif
let g:syntastic_always_populate_loc_list=1
let g:syntastic_auto_loc_list=1
let g:syntastic_loc_list_height=5
"}}}
"TAGBAR: {{{
"tagbar sidebar autostart default: 1
if !exists("g:autostarttagbar")
let g:autostarttagbar=1
endif
if (g:autostarttagbar == 1)
autocmd VimEnter * nested :call tagbar#autoopen(1)
endif
let g:tagbar_sort=0
let g:tagbar_singleclick=1
let g:tagbar_width=27
"}}}
"VIM FILER: {{{
let g:vimfiler_as_default_explorer=1
let g:vimfiler_safe_mode_by_default=0
let g:vimfiler_enable_auto_cd=1
let g:vimfiler_tree_indentation=2
let g:vimfiler_explorer_columns='type:time'
let g:vimfiler_tree_closed_icon='▸' "['▶', '▼'], ['▸', '▾'], ['▷', '◢']
let g:vimfiler_tree_opened_icon='▾'
let g:vimfiler_file_icon='-'
let g:vimfiler_marked_file_icon='+'
"edit files by double clicking them, and justify the cursor on the left
autocmd FileType vimfiler setlocal nonumber nocursorcolumn
"open automatically if vim was run without any files
autocmd VimEnter * if !argc() | VimFiler -quit -project | endif
"load the list of file extensions and handlers if it exists
if filereadable(glob("~/.vim/filetypes.vim"))
source ~/.vim/filetypes.vim
endif
"}}}
"LIGHTLINE: {{{
@ -126,7 +225,7 @@
let g:lightline = {
\ 'colorscheme': 'darkcloud',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ],
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['tagbar'] ],
\ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ },
\ 'component_function': {
@ -144,13 +243,16 @@
\ 'syntastic': 'error',
\ },
\ 'separator': {'left': '', 'right': ''},
\ 'subseparator': {'left': '', 'right': ''}
\ 'subseparator': {'left': '', 'right': ''},
\ 'component': {
\ 'tagbar': '%{tagbar#currenttag("[%s]", "", "f")}',
\ },
\ }
else
let g:lightline = {
\ 'colorscheme': 'darkcloud',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ],
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['tagbar'] ],
\ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ },
\ 'component_function': {
@ -169,89 +271,10 @@
\ },
\ 'separator': {'left': '', 'right': ''},
\ 'subseparator': {'left': '|', 'right': '|'}
\ 'component': {
\ 'tagbar': '%{tagbar#currenttag("[%s]", "", "f")}',
\ },
\ }
endif
"}}}
"MARKDOWN VIM MODE: {{{
let g:vim_markdown_folding_disabled=0
let g:vim_markdown_initial_foldlevel=2
"}}}
"SYNTASTIC: {{{
if !exists("g:autostartchecker")
let g:autostartchecker=1
endif
if (g:autostartchecker == 1)
let g:syntastic_mode_map = {'mode':'active','active_filetypes':[],'passive_filetypes':[]}
let g:syntastic_check_on_open=1
else
let g:syntastic_mode_map = {'mode':'passive','active_filetypes':[],'passive_filetypes':[]}
let g:syntastic_check_on_open=0
endif
let g:syntastic_always_populate_loc_list=1
let g:syntastic_auto_loc_list=1
let g:syntastic_loc_list_height=5
"}}}
"VIM FILER: {{{
let g:vimfiler_as_default_explorer=1
let g:vimfiler_safe_mode_by_default=0
let g:vimfiler_enable_auto_cd=1
let g:vimfiler_tree_indentation=2
let g:vimfiler_explorer_columns='type:time'
let g:vimfiler_tree_closed_icon='▸'
let g:vimfiler_tree_opened_icon='▾'
let g:vimfiler_file_icon='-'
let g:vimfiler_marked_file_icon='+'
"edit files by double clicking them, and justify the cursor on the left
autocmd FileType vimfiler setlocal nonumber nocursorcolumn
"open automatically if vim was run without any files
autocmd VimEnter * if !argc() | VimFiler -quit -project | endif
"load the list of file extensions and handlers if it exists
if filereadable(glob("~/.vim/filetypes.vim"))
source ~/.vim/filetypes.vim
endif
"}}}
"NEOCOMPLCACHE AUTOCOMPLETION PLUGIN: {{{
let g:neocomplcache_enable_at_startup=1
let g:neocomplcache_enable_smart_case=1
let g:neocomplcache_min_syntax_length=3
let g:neocomplcache_enable_insert_char_pre=1
let g:neocomplcache_enable_underbar_completion=1
let g:neocomplcache_wildcard_characters={'_': '-'}
if !exists('g:neocomplcache_omni_patterns')
let g:neocomplcache_omni_patterns = {}
endif
if !exists('g:neocomplcache_force_omni_patterns')
let g:neocomplcache_force_omni_patterns = {}
endif
let g:neocomplcache_omni_patterns.c='[^.[:digit:] *\t]\%(\.\|->\)\%(\h\w*\)\?'
let g:neocomplcache_omni_patterns.cpp='[^.[:digit:] *\t]\%(\.\|->\)\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
let g:neocomplcache_omni_patterns.xml='<[^>]*'
let g:neocomplcache_omni_patterns.html='<[^>]*'
let g:neocomplcache_omni_patterns.xhtml='<[^>]*'
let g:neocomplcache_omni_patterns.markdown='<[^>]*'
let g:neocomplcache_omni_patterns.css='^\s\+\w+\|\w+[):;]?\s\+\|[@!]'
let g:neocomplcache_omni_patterns.less='^\s\+\w+\|\w+[):;]?\s\+\|[@!]'
let g:neocomplcache_omni_patterns.javascript='[^. \t]\.\%(\h\w*\)\?'
let g:neocomplcache_omni_patterns.python='[^. *\t]\.\h\w*\|\h\w*::'
let g:neocomplcache_omni_patterns.ruby='[^. *\t]\.\w*\|\h\w*::'
let g:neocomplcache_omni_patterns.php='[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
let g:neocomplcache_omni_patterns.actionscript='[^. \t][.:]\h\w*'
let g:neocomplcache_omni_patterns.python3='[^. *\t]\.\h\w*\|\h\w*::'
let g:neocomplcache_omni_patterns.go='\h\w*\%.'
let g:neocomplcache_omni_patterns.perl='\h\w*->\h\w*\|\h\w*::'
let g:neocomplcache_omni_patterns.java='\%(\h\w*\|)\)\.'
let g:neocomplcache_omni_patterns.objc='\h\w\+\|\h\w*\%(\.\|->\)\h\w*'
let g:neocomplcache_omni_patterns.objj='[\[ \.]\w\+$\|:\w*$'
"}}}

31
vimrc
View file

@ -8,14 +8,33 @@
" "
"========================="
"USER CONFIG SETTINGS: {{{
"Darkcloud Vim Folder:
let s:darkcloudpath="/etc/darkcloud-vimconfig"
"DARKCLOUD VIM CONFIG FOLDER PATH: {{{
" If you want to use darkcloud-vimconfig as a package without symlinking
" the vim folder or placing it @ /etc/darkcloud-vimconfig, create a file
" @ ~/.vim/darkcloud-path.vim and in it place the following, except with
" the path pointing to the cloned repo:
"
" let g:darkcloudpath="/etc/darkcloud-vimconfig"
"Start With Syntax Checking: (1:start toggled on, 0:start toggled off)
if filereadable(glob("~/.vim/darkcloud-path.vim"))
source ~/.vim/darkcloud-path.vim
else
let g:darkcloudpath="/etc/darkcloud-vimconfig"
endif
"}}}
"USER CONFIG SETTINGS: {{{
" If vim/vimrc.user doesn't already exist, run the 'update' script to have
" it created, then toggle these settings there to override these and no
" avoid conflicting with updates.
"Syntax Checking Autostart: (1:start toggled on | 0: start toggled off)
let g:autostartchecker=1
"Powerline Font Support: (1:enabled, 0:disabled)
"Vim Starts With The Tagbar Open: (1:start open | 0:start closed)
let g:autostarttagbar=1
"Powerline Font Support: (1:enabled | 0:disabled)
let g:powerlinefonts=1
"GVim Font Selection: (term font set by terminal)
@ -24,7 +43,7 @@
"LOAD DARKCLOUD CONFIG AND THEME FILES: {{{
"Add Config Directory: (distro-agnostic system-wide)
let &runtimepath=printf('%s,%s/vim,%s/vim/after',&runtimepath,s:darkcloudpath,s:darkcloudpath)
let &runtimepath=printf('%s,%s/vim,%s/vim/after',&runtimepath,g:darkcloudpath,g:darkcloudpath)
"Load Settings:
runtime config/settings.vim