mirror of
https://github.com/prurigro/darkcloud-vimconfig.git
synced 2024-11-22 06:44:09 -05:00
Disabled linebreaks globally by default and added a variable to
get them back. Added the linebreak variable and another one I'd missed before to the vimrc.user creation in the update script. Added a second general settings file called "after.vim" for settings that need to be loaded after everything else. Updated maintainer tag to my real name.
This commit is contained in:
parent
abcdc6e870
commit
716f2259af
8 changed files with 70 additions and 49 deletions
|
@ -43,6 +43,7 @@
|
|||
## Configuration ##
|
||||
|
||||
* **Configure Variables**: The following variables can be added to _vim/vimrc.user_ and have their values set to the values you require:
|
||||
* **g:disablelinebreaks**: 1 = Override filetype plugins so linebreaks never occur | 0 = Linebreaks are disabled by default, but filetype plugins can override this setting (_default_: 1)
|
||||
* **g:autostartfiler**: 1 = Start the filer file manager when vim is run and the buffer is empty | 0 = Do nothing when vim is run and the buffer is empty (_default_: 1)
|
||||
* **g:autostartchecker**: 1 = Check syntax once an appropriate file is loaded | 0 = Check syntax only after syntax checking is toggled on (_default_: 0)
|
||||
* **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 (_default_: 0)
|
||||
|
@ -125,4 +126,5 @@
|
|||
* Many other authors have their work contained in this repo, most of which are self contained in the vim/bundle directory. I also used the Vim jellybean theme as a basis for the Darkcloud theme, which is maintained by NanoTech <http://nanotech.nanotechcorp.net/>
|
||||
|
||||
## License ##
|
||||
|
||||
All projects cloned in the vim/bundle folder are separate and have their own licenses. Everything else is released under the MIT license.
|
||||
|
|
13
update
13
update
|
@ -4,13 +4,16 @@
|
|||
cd "${0%/*}"
|
||||
|
||||
# create the user vimrc file in the directory if it doesn't already exist
|
||||
[[ ! -d vim ]] && install -d vim
|
||||
if [ ! -e vim/vimrc.user ]; then
|
||||
echo "Creating user configuration file 'vim/vimrc.user'..."
|
||||
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=0\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
|
||||
if [ -w vim ]; then
|
||||
echo -e '"Disable Linebreaks: (*1:force disabled globally | 0: disabled by default)\n"let g:disablelinebreaks=0\n' >> vim/vimrc.user
|
||||
echo -e '"Autostart Filer: (*1:filer loads in new empty buffers | 0: filer must be triggered)\n"let g:autostartfiler=0\n' >> vim/vimrc.user
|
||||
echo -e '"Syntax Autostart: (1:start toggled on | *0: start toggled off)\n"let g:autostartchecker=1\n' >> vim/vimrc.user
|
||||
echo -e '"Tagbar Autostart: (1:start open | *0:start closed)\n"let g:autostarttagbar=1\n' >> vim/vimrc.user
|
||||
echo -e '"Powerline Fonts: (1:enabled | *0:disabled)\n"let g:powerlinefonts=1 "(set powerline font for gvim and terminal when enabled)\n' >> vim/vimrc.user
|
||||
echo -e '"GVim Font Selection: (Escaping spaces and use powerline if appropriate)\nset guifont=Monospace\ 12' >> vim/vimrc.user
|
||||
fi
|
||||
echo
|
||||
fi
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
" "
|
||||
" Darkcloud Vim Config: theme
|
||||
" "
|
||||
" Maintainer: Prurigro (prurigro-at-gmail-dot-com) "
|
||||
" Maintainer: Kevin MacMartin (prurigro@gmail.com) "
|
||||
" Website: https://github.com/prurigro/darkcloud-vimconfig "
|
||||
" "
|
||||
" License: MIT "
|
||||
|
|
48
vim/config/after.vim
Normal file
48
vim/config/after.vim
Normal file
|
@ -0,0 +1,48 @@
|
|||
"============================================================"
|
||||
" "
|
||||
" Darkcloud Vim Config: settings to load after all else "
|
||||
" "
|
||||
" Maintainer: Kevin MacMartin (prurigro@gmail.com) "
|
||||
" Website: https://github.com/prurigro/darkcloud-vimconfig "
|
||||
" "
|
||||
" License: MIT "
|
||||
" "
|
||||
"============================================================"
|
||||
|
||||
"load the system version of matchit if another hasn't already been
|
||||
if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# ''
|
||||
runtime! macros/matchit.vim
|
||||
endif
|
||||
|
||||
"disable linebreaks by default or override all of them (default: 1)
|
||||
if !exists("g:disablelinebreaks")|let g:disablelinebreaks=1|endif
|
||||
if (g:disablelinebreaks == 1)
|
||||
autocmd VimEnter * set tw=0 nolinebreak
|
||||
else
|
||||
set tw=0 nolinebreak
|
||||
endif
|
||||
|
||||
"enable omnicompletion for any filetype without that has syntax highlighting
|
||||
if has("autocmd") && exists("+omnifunc")
|
||||
autocmd VimEnter,Filetype * if &omnifunc == ""|setlocal omnifunc=syntaxcomplete#Complete|endif
|
||||
endif
|
||||
|
||||
"FILETPE AND SYNTAX: {{{
|
||||
"misc filtype specific settings
|
||||
autocmd FileType gitcommit,notes,mail,notmuch,text setlocal spell
|
||||
autocmd FileType notes,mail,notmuch,mkd,text setlocal nonumber
|
||||
autocmd FileType mail,notmuch,text setlocal wrap
|
||||
autocmd FileType notes setlocal tw=80
|
||||
autocmd FileType help* wincmd L "help windows always open vertically
|
||||
autocmd FileType help* vertical resize 80 "set the window size to 80 cols
|
||||
autocmd FileType help* setlocal nocursorline "remove the horizontal cursor line
|
||||
autocmd BufEnter,FileType qf,help* setlocal nowrap nocursorcolumn "disable text wrapping and the vertical cursor line
|
||||
autocmd BufEnter,FileType extradite setlocal number
|
||||
|
||||
"settings for buffers in diff mode
|
||||
autocmd VimEnter,FilterWritePre * if &diff|setlocal nofoldenable|endif
|
||||
autocmd VimEnter * if &diff|wincmd H|endif
|
||||
|
||||
"disable the whitespace plugin for vimfiler
|
||||
autocmd BufEnter,FileType vimfiler hi ExtraWhitespace ctermbg=NONE guibg=NONE
|
||||
"}}}
|
|
@ -2,7 +2,7 @@
|
|||
" "
|
||||
" Darkcloud Vim Config: keyboard settings "
|
||||
" "
|
||||
" Maintainer: Prurigro (prurigro-at-gmail-dot-com) "
|
||||
" Maintainer: Kevin MacMartin (prurigro@gmail.com) "
|
||||
" Website: https://github.com/prurigro/darkcloud-vimconfig "
|
||||
" "
|
||||
" License: MIT "
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
" "
|
||||
" Darkcloud Vim Config: plugin settings "
|
||||
" "
|
||||
" Maintainer: Prurigro (prurigro-at-gmail-dot-com) "
|
||||
" Maintainer: Kevin MacMartin (prurigro@gmail.com) "
|
||||
" Website: https://github.com/prurigro/darkcloud-vimconfig "
|
||||
" "
|
||||
" License: MIT "
|
||||
|
@ -148,9 +148,7 @@
|
|||
|
||||
"VIM FILER: {{{
|
||||
"autostart filer when vim opens to an empty buffer (default: 1)
|
||||
if !exists("g:autostartfiler")
|
||||
let g:autostartfiler=1
|
||||
endif
|
||||
if !exists("g:autostartfiler")|let g:autostartfiler=1|endif
|
||||
if (g:autostartfiler == 1)
|
||||
autocmd VimEnter * if !argc() | VimFiler -quit -project | endif
|
||||
endif
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
" "
|
||||
" Darkcloud Vim Config: main settings "
|
||||
" "
|
||||
" Maintainer: Prurigro (prurigro-at-gmail-dot-com) "
|
||||
" Maintainer: Kevin MacMartin (prurigro@gmail.com) "
|
||||
" Website: https://github.com/prurigro/darkcloud-vimconfig "
|
||||
" "
|
||||
" License: MIT "
|
||||
|
@ -43,10 +43,8 @@
|
|||
set list listchars=tab:>-,trail:- "display tabs as: >--- and trailing spaces as: -
|
||||
set autochdir "current dir is file dir
|
||||
set history=250 "undo history
|
||||
set timeoutlen=1000 ttimeoutlen=0 "shorten the timeout length of escapes
|
||||
set timeoutlen=800 ttimeoutlen=0 "shorten the timeout length of escapes
|
||||
set whichwrap=b,s,<,>,[,] "allow the cursor to wrap lines
|
||||
set textwidth=0 "set an unlimited text width before breaking the line when line breaks are enabled
|
||||
set nolinebreak "disable linebreaks, though this will be overridden by filetype plugins
|
||||
set showmatch "show matching open bracket when closed bracket is inserted
|
||||
set matchtime=5 "the amount of time the matching bracket will highlight
|
||||
set smarttab expandtab autoindent tabstop=4 shiftwidth=4 "configure tabs
|
||||
|
@ -55,12 +53,7 @@
|
|||
set diffopt=foldcolumn:0,filler "vimdiff default settings
|
||||
set formatoptions=roqnl12 "how automatic formatting is to be done
|
||||
set foldmethod=syntax foldcolumn=1 foldlevel=3 "fold layers 3 or more deep
|
||||
let &showbreak=" " "when linewrap is enabled, show wrapped lines with +++
|
||||
|
||||
"load the system version of matchit if another hasn't already been
|
||||
if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# ''
|
||||
runtime! macros/matchit.vim
|
||||
endif
|
||||
let &showbreak="_" "highlight wrapped lines when linewrap is enabled
|
||||
|
||||
"enable tab completion in command mode and configure how it handles extensions
|
||||
set completeopt=longest,menuone
|
||||
|
@ -72,7 +65,7 @@
|
|||
|
||||
"FILETYPES AND SYNTAX: SETTINGS FOR FILETYPES AND ASSOCIATED SYNTAX {{{
|
||||
filetype plugin indent on
|
||||
syntax on "turn syntax highlighting on
|
||||
syntax on
|
||||
|
||||
"set matching filenames to matching filenames
|
||||
autocmd BufNewFile,BufRead *.aspx,*.asmx,*.ascx,*.master setf aspnet
|
||||
|
@ -80,32 +73,6 @@
|
|||
autocmd BufNewFile,BufRead pacman.conf,yaourtrc setf sh
|
||||
autocmd BufNewFile,BufRead archversion.conf setf archversion
|
||||
autocmd BufNewFile,BufRead cjdroute.conf,cjdmaid.conf setf json
|
||||
|
||||
"misc filtype specific settings
|
||||
autocmd FileType gitcommit,notes,mail,notmuch,text setlocal spell
|
||||
autocmd FileType notes,mail,notmuch,mkd,text setlocal nonumber
|
||||
autocmd FileType mail,notmuch,text setlocal wrap
|
||||
autocmd FileType notes setlocal textwidth=80
|
||||
autocmd FileType help* wincmd L "help windows always open vertically
|
||||
autocmd FileType help* vertical resize 80 "set the window size to 80 cols
|
||||
autocmd FileType help* setlocal nocursorline "remove the horizontal cursor line
|
||||
autocmd BufEnter,FileType qf,help* setlocal nowrap nocursorcolumn "disable text wrapping and the vertical cursor line
|
||||
autocmd BufEnter,FileType extradite setlocal number
|
||||
|
||||
"settings for buffers in diff mode
|
||||
autocmd VimEnter,FilterWritePre * if &diff|setlocal nofoldenable|endif
|
||||
autocmd VimEnter * if &diff|wincmd H|endif
|
||||
|
||||
"enable omnicompletion for any filetype without that has syntax highlighting
|
||||
if has("autocmd") && exists("+omnifunc")
|
||||
autocmd VimEnter,Filetype *
|
||||
\ if &omnifunc == "" |
|
||||
\ setlocal omnifunc=syntaxcomplete#Complete |
|
||||
\ endif
|
||||
endif
|
||||
|
||||
"disable the whitespace plugin for vimfiler
|
||||
autocmd BufEnter,FileType vimfiler hi ExtraWhitespace ctermbg=NONE guibg=NONE
|
||||
"}}}
|
||||
|
||||
"GVIM: GUI CONFIG OPTIONS {{{
|
||||
|
|
5
vimrc
5
vimrc
|
@ -2,7 +2,7 @@
|
|||
" "
|
||||
" Darkcloud Vim Config: vimrc "
|
||||
" "
|
||||
" Maintainer: Prurigro (prurigro-at-gmail-dot-com) "
|
||||
" Maintainer: Kevin MacMartin (prurigro@gmail.com) "
|
||||
" Website: https://github.com/prurigro/darkcloud-vimconfig "
|
||||
" "
|
||||
" License: MIT "
|
||||
|
@ -45,4 +45,7 @@
|
|||
|
||||
"Load Colour Scheme:
|
||||
colorscheme darkcloud
|
||||
|
||||
"Load After Config:
|
||||
runtime config/after.vim
|
||||
"}}}
|
||||
|
|
Loading…
Reference in a new issue