diff --git a/.gitmodules b/.gitmodules index 983e479..f61046f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/README.md b/README.md index 5f4ab62..347e3ab 100644 --- a/README.md +++ b/README.md @@ -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'. diff --git a/update b/update new file mode 100755 index 0000000..4c24db5 --- /dev/null +++ b/update @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +git pull origin +git submodule update --init diff --git a/vim/bundle/vim-markdown b/vim/bundle/vim-markdown new file mode 160000 index 0000000..c100762 --- /dev/null +++ b/vim/bundle/vim-markdown @@ -0,0 +1 @@ +Subproject commit c10076297fa5c1021631f1f08610bc045529482d diff --git a/vim/colors/darkcloud.vim b/vim/colors/darkcloud.vim index d64903a..0c64170 100644 --- a/vim/colors/darkcloud.vim +++ b/vim/colors/darkcloud.vim @@ -2,8 +2,8 @@ " " " Darkcloud Vim Theme: " " " -" Version: 1.0 " -" Maintainer: Prurigro " +" Version: 1.0 " +" Maintainer: Prurigro " " " "========================" " @@ -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","","","","","") diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index 0fccbae..7c89712 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -1,4 +1,4 @@ -"==========================" +"===========================" " Keyboard Configuration: " "===========================" " @@ -25,7 +25,7 @@ " (toggles) " | (A) -> toggle line numbers " | (A) -> toggle row/column highlighting -" | (A) -> toggle spellcheck +" | (A) -> toggle spell check " | (A) -> toggle line wrapping " | (A) -> toggle the nerdtree sidebar " | (A) -> toggle the tagbar sidebar @@ -44,7 +44,7 @@ " \| | (N) -> add word to a local list of correct spellings " | (N) -> undo the most recent match selection " | (I) -> write the part common to all suggestions -" | (I) -> cancle the match dialog (during suggestion) +" | (I) -> cancel the match dialog (during suggestion) " " (formatting) " | (V) -> deletes currently selected text @@ -61,13 +61,9 @@ " (movement) " = | (N) -> move to the first character on the next line " | (N) -> move to the beginning of the document -" | (N) -> move to the beginning of the document " | (N) -> move to the end of the document -" | (N) -> move to the end of the document " | (N) -> move to the end of the line -" | (N) -> move to the end of the line " | (N) -> move to the beginning of the non-whitespace -" | (N) -> move to the beginning of the line " " (selection) " | (V) -> select all @@ -76,41 +72,34 @@ " a | (N) -> select all " | (V) -> toggle selection of all text above the cursor " | (N) -> select all text above the cursor -" | (V) -> toggle selection of all text above the cursor -" | (N) -> select all text above the cursor " | (V) -> toggle selection of all text below the cursor " | (N) -> select all text below the cursor -" | (V) -> toggle selection of all text below the cursor -" | (N) -> select all text below the cursor " | (V) -> toggle selection of all text to the right of the cursor " | (N) -> select all text to the right of the cursor -" | (V) -> toggle selection of all text to the right of the cursor -" | (N) -> select all text to the right of the cursor " | (V) -> toggle selection of all non-whitespace to the left " | (N) -> select all non-whitespace to the left -" | (V) -> toggle selection of all non-whitespace to the left -" | (N) -> select to the beginning of the line " " (vimdiff) -" du | (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 +" | (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 +" p | (N) -> view the paste buffers and register contents +" 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 " " Aliases: " :wsudo -and- :sudow | (C) -> :SudoWrite (write the file as root using sudo) @@ -197,7 +186,7 @@ let g:user_emmet_leader_key='' "press backslash twice on a mispelled word for suggestions - nnoremap \\ ea + nnoremap \\ hei nnoremap \| zg "neocomplcache suggestions: cancel, autocomplete, scroll up and scroll down @@ -230,13 +219,9 @@ "remap keys to scroll through text nnoremap gg0 - nnoremap gg0 nnoremap G$ - nnoremap G$ nnoremap $ - nnoremap $ nnoremap ^ - nnoremap ^ "} "SELECTION:{ @@ -247,32 +232,27 @@ nnoremap a gg0vG$ vnoremap gg0 nnoremap vgg0 - vnoremap gg0 - nnoremap vgg0 vnoremap G$ nnoremap vG$ - vnoremap G$ - nnoremap vG$ vnoremap $ nnoremap v$ - vnoremap $ - nnoremap v$ vnoremap ^ nnoremap v^ - vnoremap ^ - nnoremap v^ "} "VIMDIFF:{ "map shortcuts for vimdiff - nnoremap du ':diffu' - nnoremap > ]c - nnoremap < [c - nnoremap . dp - nnoremap , do + nnoremap ':diffu' + nnoremap >> ]c + nnoremap << [c + nnoremap <> dp + nnoremap >< do "} "PASTE:{ + "display contents of paste buffers + nnoremap p ':reg' + "allow y to copy in normal mode nnoremap y vy diff --git a/vim/config/plugins.vim b/vim/config/plugins.vim index b162621..14acca6 100644 --- a/vim/config/plugins.vim +++ b/vim/config/plugins.vim @@ -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 diff --git a/vim/config/settings.vim b/vim/config/settings.vim index 86e1de1..ab0610e 100644 --- a/vim/config/settings.vim +++ b/vim/config/settings.vim @@ -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) diff --git a/vim/pathogen_update_plugins b/vim/pathogen_update_plugins deleted file mode 100755 index 2fd801e..0000000 --- a/vim/pathogen_update_plugins +++ /dev/null @@ -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