Added a new script that can be used to update the repo if bash is

available. Updated the README. Improved the theme by adding a bunch
of syntax highlighting definitions (mostly rooted in html, though
a bunch of other languages base their colours on it), as well as
tweaking visual selection to longer invert on the block with the cursor,
and parenthesis matching to look the same at both ends. Added a plugin
that improves the theme and adds some keyboard shortcuts to markdown,
which is what the README.md files in Github are written in. I realized
that the h,j,k,l shortcuts equivalent to the ones with arrow keys I'd
added were overwriting other shortcuts with the shift combinations, so
I removed those and the ctrl-ones for consistency. The diff shortcuts
weren't intuitive or easy on the hands, so I tried something else and
I think it works much better now (check vim/keyboard.vim). An update
script has also been added to simplify updating submodules; I'm not
completely clear as to whether following this method will properly
update the submodules in certain conditions like when one is removed,
but this should add new ones and update the existing ones after pulling
from the repo.
This commit is contained in:
Kevin 2014-04-01 00:03:52 -04:00
parent 76369ab429
commit 46be09900c
9 changed files with 81 additions and 99 deletions

3
.gitmodules vendored
View file

@ -37,3 +37,6 @@
[submodule "vim/bundle/nerdtree"]
path = vim/bundle/nerdtree
url = https://github.com/scrooloose/nerdtree.git
[submodule "vim/bundle/vim-markdown"]
path = vim/bundle/vim-markdown
url = https://github.com/plasticboy/vim-markdown.git

View file

@ -2,18 +2,18 @@
## Requirements
1. Git and Bash: Required to manage plugin updates using the "pathogen_update_plugins" script.
2. CTags: Available @ http://ctags.sourceforge.net, this can be in $PATH or in the vim folder and is required for the tagbar plugin.
3. Vim v7.4+: Everything has been written and tested using Vim 7.4.135, and I assume there could be issues with 7.3 and below.
4. Powerline Fonts (optional): Required for the powerline lightline theme, which can be toggled in /etc/vimrc along with the gvim font
1. Git: Required to clone and update the repository.
3. CTags: Available @ http://ctags.sourceforge.net, this can be in $PATH or in the vim folder and is required for the tagbar plugin.
4. Vim v7.4+: Everything has been written and tested using Vim 7.4.135, and I assume there could be issues with 7.3 and below.
2. Bash (optional): Required to use the update script, which simply runs the git repo and submodule update commands.
5. Powerline Fonts (optional): Required for the powerline lightline theme, which can be toggled in /etc/vimrc along with the gvim font
## Installation
1. Clone this repository then initialize and update the git submodules (in our case, the vim plugins)
* ]$ git clone https://github.com/prurigro/darkcloud-vimconfig.git
* ]$ cd darkcloud-vimconfig
* ]$ git submodule init
* ]$ git submodule update
* ]$ git submodule update --init
2. Edit the 'vimrc' file and select whether to expect powerline fonts, choose a font for gvim, and add or change any of the loaded config files to match your personal setup.
3. There are two main ways this package can be deployed: system-wide or single-user.
* For a distro-agnostic system-wide installation in the /etc directory, copy or link: 'vimrc' to '/etc/vimrc' and the 'vim' folder to '/etc/vim'.

4
update Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
git pull origin
git submodule update --init

@ -0,0 +1 @@
Subproject commit c10076297fa5c1021631f1f08610bc045529482d

View file

@ -267,31 +267,15 @@ else
endif
"COLOR SETTINGS:
"format: (name ,fg ,bg ,style ,lowcolor-fg,lowcolor-bg)
"exmple: ("Sel","000000","f0f0f0","italic,bold",s:termBlack,"White")
"format: ('name','fg ','bg ','style ',s:lowcolor-fg,'lowcolor-bg')
"example:('Line','000000','f0f0f0','italic,bold',s:termBlack ,'White')
"Default foreground and background
call s:X("Normal","bcbcbc","262626","","White",s:termBlack)
call s:X("Visual","","262626","standout","",s:termBlack)
call s:X("Cursor","","262626","standout,bold,underline","",s:termBlack)
call s:X("Pmenu","87d7ff","303030","","Grey","Blue")
call s:X("PmenuSel","87d7ff","4e4e4e","bold","White","Black")
call s:X("MatchParen","000000","87d7ff","bold",s:termBlack,"Blue")
call s:X("CursorColumn","","303030","","",s:termBlack)
call s:X("CursorLine","","303030","","",s:termBlack)
call s:X("CursorLineNr","87d7ff","","bold","Blue",s:termBlack)
call s:X("LineNr","ffaf00","","","Yellow",s:termBlack)
call s:X("TabLine","","000000","","",s:termBlack)
call s:X("TabLineFill","","000000","","",s:termBlack)
call s:X("TabLineSel","000000","ffffff","",s:termBlack,"White")
call s:X("Visual","","000000","standout","",s:termBlack)
call s:X("Cursor","000000","87d7ff","underline",s:termBlack,"Blue")
call s:X("Comment","626262","","","Grey","")
call s:X("Todo","ffaf00","808080","","Red",s:termBlack)
call s:X("StatusLine","000000","d75f5f","bold",s:termBlack,"Red")
call s:X("StatusLineNC","ffffff","626262","","White","Grey")
call s:X("VertSplit","626262","626262","",s:termBlack,s:termBlack)
@ -302,6 +286,19 @@ call s:X("FoldColumn","ffaf00","626262","bold","Red",s:termBlack)
call s:X("SignColumn","ffaf00","626262","bold","Red",s:termBlack)
call s:X("ColorColumn","ffaf00","626262","bold","Red",s:termBlack)
call s:X("TabLine","","000000","","",s:termBlack)
call s:X("TabLineFill","","000000","","",s:termBlack)
call s:X("TabLineSel","000000","ffffff","",s:termBlack,"White")
call s:X("Comment","626262","","","Grey","")
call s:X("Todo","ffaf00","808080","","Red",s:termBlack)
call s:X("Normal","d0d0d0","262626","","White",s:termBlack)
call s:X("MatchParen","ffffff","262626","standout,underline",s:termBlack,"White")
call s:X("CursorColumn","","303030","","",s:termBlack)
call s:X("CursorLine","","303030","","",s:termBlack)
call s:X("CursorLineNr","87d7ff","","bold","Blue",s:termBlack)
call s:X("LineNr","ffaf00","","","Yellow",s:termBlack)
call s:X("Title","d75f5f","","underline","Red","")
call s:X("Constant","d75f5f","","bold","Red","")
call s:X("Special","ffaf00","","","Yellow","")
@ -330,7 +327,7 @@ hi! link MoreMsg Special
call s:X("SpellBad","d75f5f","","undercurl","","Red")
call s:X("SpellCap","87d7ff","","undercurl","","Blue")
call s:X("SpellLocal","ffd787","","undercurl","","Yellow")
"call s:X("SpellRare","","","","","")
call s:X("SpellRare","ffffff","","italic","White","")
"diff
hi! link diffRemoved Constant
@ -340,6 +337,16 @@ call s:X("DiffDelete","000000","d75f5f","italic",s:termBlack,"Red")
call s:X("DiffChange","000000","87d7ff","italic",s:termBlack,"Blue")
call s:X("DiffText","000000","c6c6c6","italic",s:termBlack,"White")
"html
hi! link htmlLink Statement
call s:X("htmlTitle","ffffff","","underline","White","")
call s:X("htmlH1","d75f5f","","standout,underline,bold","Red","")
call s:X("htmlH2","ffd787","","standout,underline,bold","Red","")
call s:X("htmlH3","87d7ff","","standout,underline,bold","Blue","")
call s:X("htmlH4","d75f5f","","underline,bold","Blue","")
call s:X("htmlH5","ffd787","","underline,bold","Yellow","")
call s:X("htmlH6","87d7ff","","underline,bold","Yellow","")
"php
hi! link phpFunctions Function
hi! link phpSuperglobal Identifier
@ -348,7 +355,7 @@ hi! link phpQuoteDouble StringDelimiter
hi! link phpBoolean Constant
hi! link phpNull Constant
hi! link phpArrayPair Operator
"call s:X("StorageClass","","","","","")
hi! link StorageClass Type
"ruby
hi! link rubySharpBang Comment
@ -359,9 +366,9 @@ hi! link rubyModule rubyClass
hi! link rubyString String
hi! link rubyStringDelimiter StringDelimiter
hi! link rubyInterpolationDelimiter Identifier
"call s:X("rubyClass","","","","","")
"call s:X("rubyIdentifier","","","","","")
"call s:X("rubyInstanceVariable","","","","","")
hi! link rubyClass Type
hi! link rubyIdentifier Identifier
call s:X("rubyGlobalVariable","","","bold","","")
"call s:X("rubySymbol","","","","","")
"call s:X("rubyControl","","","","","")
"call s:X("rubyRegexpDelimiter","","","","","")

View file

@ -1,4 +1,4 @@
"=========================="
"==========================="
" Keyboard Configuration: "
"==========================="
"
@ -44,7 +44,7 @@
" \| | (N) -> add word to a local list of correct spellings
" <Leader><Backspace> | (N) -> undo the most recent match selection
" <Tab> | (I) -> write the part common to all suggestions
" <Backspace> | (I) -> cancle the match dialog (during suggestion)
" <Backspace> | (I) -> cancel the match dialog (during suggestion)
"
" (formatting)
" <Backspace> | (V) -> deletes currently selected text
@ -61,13 +61,9 @@
" (movement)
" = | (N) -> move to the first character on the next line
" <Ctrl-Up> | (N) -> move to the beginning of the document
" <Ctrl-k> | (N) -> move to the beginning of the document
" <Ctrl-Down> | (N) -> move to the end of the document
" <Ctrl-j> | (N) -> move to the end of the document
" <Ctrl-Right> | (N) -> move to the end of the line
" <Ctrl-l> | (N) -> move to the end of the line
" <Ctrl-Left> | (N) -> move to the beginning of the non-whitespace
" <Ctrl-h> | (N) -> move to the beginning of the line
"
" (selection)
" <Ctrl-a> | (V) -> select all
@ -76,41 +72,34 @@
" <Leader>a | (N) -> select all
" <Shift-Up> | (V) -> toggle selection of all text above the cursor
" <Shift-Up> | (N) -> select all text above the cursor
" <Shift-k> | (V) -> toggle selection of all text above the cursor
" <Shift-k> | (N) -> select all text above the cursor
" <Shift-Down> | (V) -> toggle selection of all text below the cursor
" <Shift-Down> | (N) -> select all text below the cursor
" <Shift-j> | (V) -> toggle selection of all text below the cursor
" <Shift-j> | (N) -> select all text below the cursor
" <Shift-Right> | (V) -> toggle selection of all text to the right of the cursor
" <Shift-Right> | (N) -> select all text to the right of the cursor
" <Shift-l> | (V) -> toggle selection of all text to the right of the cursor
" <Shift-l> | (N) -> select all text to the right of the cursor
" <Shift-Left> | (V) -> toggle selection of all non-whitespace to the left
" <Shift-Left> | (N) -> select all non-whitespace to the left
" <Shift-h> | (V) -> toggle selection of all non-whitespace to the left
" <Shift-h> | (N) -> select to the beginning of the line
"
" (vimdiff)
" du | (N) -> update differences
" <Ctrl-n> | (N) -> next difference
" <Ctrl-p> | (N) -> previous difference
" < | (N) -> replace diff in current pane with other pane
" > | (N) -> replace diff in other pane with current pane
" <Leader><Space> | (N) -> update differences
" >> | (N) -> next difference
" << | (N) -> previous difference
" >< | (N) -> replace diff in current pane with other pane
" <> | (N) -> replace diff in other pane with current pane
"
" (paste)
" y | (N) -> copies the character
" p | (V) -> paste and replace the currently selected text
" P | (V) -> paste and replace the currently selected text
" \d | (V) -> delete the currently selected text
" \x | (V) -> delete the currently selected text
" \x | (N) -> delete the char(s) under and the cursor
" \X | (V) -> delete the currently selected lines
" \X | (N) -> delete the char(s) before the cursor
" \D | (V) -> delete the currently selected lines
" \D | (N) -> delete chars under and after the cursor on the line
" \dw | (N) -> delete chars under and after the cursor in the word
" \dd | (N) -> delete lines under and after the one below
" <Leader>p | (N) -> view the paste buffers and register contents
" <Leader>d | (V) -> delete the currently selected text
" <Leader>x | (V) -> delete the currently selected text
" <Leader>x | (N) -> delete the char(s) under and the cursor
" <Leader>X | (V) -> delete the currently selected lines
" <Leader>X | (N) -> delete the char(s) before the cursor
" <Leader>D | (V) -> delete the currently selected lines
" <Leader>D | (N) -> delete chars under and after the cursor on the line
" <Leader>dw | (N) -> delete chars under and after the cursor in the word
" <Leader>dd | (N) -> delete lines under and after the one below
"
" Aliases:
" :wsudo -and- :sudow | (C) -> :SudoWrite (write the file as root using sudo)
@ -197,7 +186,7 @@
let g:user_emmet_leader_key='<C-Z>'
"press backslash twice on a mispelled word for suggestions
nnoremap \\ ea<C-X><C-S>
nnoremap \\ hei<C-X><C-S>
nnoremap \| zg
"neocomplcache suggestions: cancel, autocomplete, scroll up and scroll down
@ -230,13 +219,9 @@
"remap keys to scroll through text
nnoremap <C-Up> gg0
nnoremap <C-k> gg0
nnoremap <C-Down> G$
nnoremap <C-j> G$
nnoremap <C-Right> $
nnoremap <C-l> $
nnoremap <C-Left> ^
nnoremap <C-h> ^
"}
"SELECTION:{
@ -247,32 +232,27 @@
nnoremap <Leader>a gg0vG$
vnoremap <S-Up> gg0
nnoremap <S-Up> vgg0
vnoremap <S-k> gg0
nnoremap <S-k> vgg0
vnoremap <S-Down> G$
nnoremap <S-Down> vG$
vnoremap <S-j> G$
nnoremap <S-j> vG$
vnoremap <S-Right> $
nnoremap <S-Right> v$
vnoremap <S-l> $
nnoremap <S-l> v$
vnoremap <S-Left> ^
nnoremap <S-Left> v^
vnoremap <S-h> ^
nnoremap <S-h> v^
"}
"VIMDIFF:{
"map shortcuts for vimdiff
nnoremap <silent><expr> du ':diffu<CR>'
nnoremap > ]c
nnoremap < [c
nnoremap <Leader>. dp
nnoremap <Leader>, do
nnoremap <silent><expr> <Leader><Space> ':diffu<CR>'
nnoremap >> ]c
nnoremap << [c
nnoremap <> dp
nnoremap >< do
"}
"PASTE:{
"display contents of paste buffers
nnoremap <silent><expr> <Leader>p ':reg<CR>'
"allow y to copy in normal mode
nnoremap y vy<Esc>

View file

@ -11,6 +11,11 @@
autocmd FileType html,css,php,aspx EmmetInstall
"}}}
"MARKDOWN VIM MODE: SETTINGS {{{
let g:vim_markdown_folding_disabled=0
let g:vim_markdown_initial_foldlevel=2
"}}}
"NEOCOMPLCACHE AUTOCOMPLETION PLUGIN: ENABLE, CONFIG AND SETUP OMNICOMPLETION {{{"
let g:neocomplcache_enable_at_startup=1
let g:neocomplcache_enable_smart_case=1

View file

@ -70,6 +70,7 @@
"FILETYPES: SETTINGS SPECIFIC TO A FILETYPE {{{
au FileType mail setl spell "enable spellcheck for e-mail (mutt)
au FileType gitcommit setl spell "enable spellcheck in git commits
au FileType mkd setl spell "enable spellcheck in markdown (ie: README.md)
au BufNewFile,BufRead *.txt setl spell "enable spellcheck for text files (*.txt)
au BufNewFile,BufRead *tmux.conf setf sh "set syntax for *tmux.conf to sh (bash)
au BufNewFile,BufRead pacman.conf setf sh "set syntax for *tmux.conf to sh (bash)

View file

@ -1,19 +0,0 @@
#!/usr/bin/env bash
#Update pathogen bundles
pushd bundle > /dev/null 2>&1
for each in *; do
if [ -d "$each" ]; then
pushd "$each" > /dev/null 2>&1
if [ -d .git ]; then
echo "Updating git repo: ${each}..."
git pull
elif [ -d .git -o -f .git ]; then
echo "Updating git submodule: ${each}..."
git pull origin master
git submodule update
fi
popd > /dev/null 2>&1
fi
done
popd > /dev/null 2>&1