mirror of https://github.com/amix/vimrc.git
parent
0666a9a06a
commit
8acdcd787d
@ -0,0 +1,63 @@ |
||||
[submodule "sources_plugins/vim-snipmate"] |
||||
path = sources_plugins/vim-snipmate |
||||
url = git://github.com/garbas/vim-snipmate.git |
||||
[submodule "sources_plugins/vim-addon-mw-utils"] |
||||
path = sources_plugins/vim-addon-mw-utils |
||||
url = git://github.com/MarcWeber/vim-addon-mw-utils.git |
||||
[submodule "sources_plugins/tlib"] |
||||
path = sources_plugins/tlib |
||||
url = git://github.com/vim-scripts/tlib.git |
||||
[submodule "sources_plugins/vim-snippets"] |
||||
path = sources_plugins/vim-snippets |
||||
url = git://github.com/acustodioo/vim-snippets.git |
||||
[submodule "sources_colors/vim-irblack"] |
||||
path = sources_colors/vim-irblack |
||||
url = git://github.com/wgibbs/vim-irblack.git |
||||
[submodule "sources_colors/mayansmoke"] |
||||
path = sources_colors/mayansmoke |
||||
url = git://github.com/vim-scripts/mayansmoke.git |
||||
[submodule "sources_colors/peaksea"] |
||||
path = sources_colors/peaksea |
||||
url = git://github.com/vim-scripts/peaksea.git |
||||
[submodule "sources_colors/vim-pyte"] |
||||
path = sources_colors/vim-pyte |
||||
url = git://github.com/therubymug/vim-pyte.git |
||||
[submodule "sources_plugins/bufexplorer.zip"] |
||||
path = sources_plugins/bufexplorer.zip |
||||
url = git://github.com/vim-scripts/bufexplorer.zip.git |
||||
[submodule "sources_plugins/nerdtree"] |
||||
path = sources_plugins/nerdtree |
||||
url = git://github.com/scrooloose/nerdtree.git |
||||
[submodule "sources_plugins/vim-surround"] |
||||
path = sources_plugins/vim-surround |
||||
url = git://github.com/tpope/vim-surround.git |
||||
[submodule "sources_plugins/YankRing"] |
||||
path = sources_plugins/YankRing |
||||
url = git://github.com/vim-scripts/YankRing.vim.git |
||||
[submodule "sources_misc/vim-coffee-script"] |
||||
path = sources_misc/vim-coffee-script |
||||
url = git://github.com/kchmck/vim-coffee-script.git |
||||
[submodule "sources_misc/vim-less"] |
||||
path = sources_misc/vim-less |
||||
url = git://github.com/groenewege/vim-less.git |
||||
[submodule "sources_plugins/ack.vim"] |
||||
path = sources_plugins/ack.vim |
||||
url = git://github.com/mileszs/ack.vim.git |
||||
[submodule "sources_plugins/open_file_under_cursor.vim"] |
||||
path = sources_plugins/open_file_under_cursor.vim |
||||
url = git://github.com/amix/open_file_under_cursor.vim.git |
||||
[submodule "sources_plugins/ctrlp.vim"] |
||||
path = sources_plugins/ctrlp.vim |
||||
url = git://github.com/kien/ctrlp.vim.git |
||||
[submodule "sources_plugins/vim-peepopen"] |
||||
path = sources_plugins/vim-peepopen |
||||
url = git://github.com/shemerey/vim-peepopen.git |
||||
[submodule "sources_misc/vim-bundle-mako"] |
||||
path = sources_misc/vim-bundle-mako |
||||
url = git://github.com/sophacles/vim-bundle-mako.git |
||||
[submodule "sources_plugins/vim-powerline"] |
||||
path = sources_plugins/vim-powerline |
||||
url = git://github.com/Lokaltog/vim-powerline.git |
||||
[submodule "sources_colors/vim-colors-solarized"] |
||||
path = sources_colors/vim-colors-solarized |
||||
url = git://github.com/altercation/vim-colors-solarized.git |
@ -0,0 +1,12 @@ |
||||
echo 'set runtimepath=~/.vim_runtime,~/.vim_runtime/after,\$VIMRUNTIME |
||||
|
||||
source ~/.vim_runtime/vimrcs/basic.vim |
||||
source ~/.vim_runtime/vimrcs/filetypes.vim |
||||
source ~/.vim_runtime/vimrcs/plugins_config.vim |
||||
source ~/.vim_runtime/vimrcs/extended.vim |
||||
|
||||
if filereadable("~/.vim_runtime/vimrcs/my_configs.vim") |
||||
source ~/.vim_runtime/vimrcs/my_configs.vim |
||||
endif' > ~/.vimrc |
||||
|
||||
echo "Installed the Ultimate Vim configuration successfully! Enjoy :-)" |
@ -0,0 +1 @@ |
||||
Subproject commit 168883af7aec05f139af251f47eadd5dfb802c9d |
@ -0,0 +1 @@ |
||||
Subproject commit 528a59f26d12278698bb946f8fb82a63711eec21 |
@ -0,0 +1 @@ |
||||
Subproject commit 59622caff32a7925181ab139701fad3eee54ae51 |
@ -0,0 +1 @@ |
||||
Subproject commit a1071f30656b26645b69f59e1e05257829a39620 |
@ -0,0 +1 @@ |
||||
Subproject commit c7018343f407aae9369c04d4913d1f4ffcb715bf |
@ -0,0 +1,601 @@ |
||||
" Vim color file --- psc (peak sea color) "Lite version" |
||||
" Maintainer: Pan, Shi Zhu <Go to the following URL for my email> |
||||
" URL: http://vim.sourceforge.net/scripts/script.php?script_id=760 |
||||
" Last Change: 5 Feb 2010 |
||||
" Version: 3.4 |
||||
" |
||||
" Comments and e-mails are welcomed, thanks. |
||||
" |
||||
" The peaksea color is simply a colorscheme with the default settings of |
||||
" the original ps_color. Lite version means there's no custom settings |
||||
" and fancy features such as integration with reloaded.vim |
||||
" |
||||
" The full version of ps_color.vim will be maintained until Vim 8. |
||||
" By then there will be only the lite version: peaksea.vim |
||||
" |
||||
" Note: Please set the background option in your .vimrc and/or .gvimrc |
||||
" |
||||
" It is much better *not* to set 'background' option inside |
||||
" a colorscheme file. because ":set background" improperly |
||||
" may cause colorscheme be sourced twice |
||||
" |
||||
" Color Scheme Overview: |
||||
" :ru syntax/hitest.vim |
||||
" |
||||
" Relevant Help: |
||||
" :h highlight-groups |
||||
" :h psc-cterm-color-table |
||||
" |
||||
" Colors Order: |
||||
" #rrggbb |
||||
" |
||||
|
||||
hi clear |
||||
|
||||
if exists("syntax_on") |
||||
syntax reset |
||||
endif |
||||
|
||||
let g:colors_name = expand("<sfile>:t:r") |
||||
|
||||
" I don't want to abuse folding, but here folding is used to avoid confusion. |
||||
if &background=='light' |
||||
" for background=light {{{2 |
||||
" LIGHT COLOR DEFINE START |
||||
|
||||
hi Normal guifg=#000000 guibg=#e0e0e0 gui=NONE |
||||
hi Search guifg=White guibg=DarkRed gui=NONE |
||||
hi Visual guifg=NONE guibg=#a6caf0 gui=NONE |
||||
hi Cursor guifg=#f0f0f0 guibg=#008000 gui=NONE |
||||
" The idea of CursorIM is pretty good, however, the feature is still buggy |
||||
" in the current version (Vim 7.0). |
||||
" The following line will be kept commented until the bug fixed. |
||||
" |
||||
" hi CursorIM guifg=#f0f0f0 guibg=#800080 |
||||
hi Special guifg=#907000 guibg=NONE gui=NONE |
||||
hi Comment guifg=#606000 guibg=NONE gui=NONE |
||||
hi Number guifg=#907000 guibg=NONE gui=NONE |
||||
hi Constant guifg=#007068 guibg=NONE gui=NONE |
||||
hi StatusLine guifg=fg guibg=#a6caf0 gui=NONE |
||||
hi LineNr guifg=#686868 guibg=NONE gui=NONE |
||||
hi Question guifg=fg guibg=#d0d090 gui=NONE |
||||
hi PreProc guifg=#009030 guibg=NONE gui=NONE |
||||
hi Statement guifg=#2060a8 guibg=NONE gui=NONE |
||||
hi Type guifg=#0850a0 guibg=NONE gui=NONE |
||||
hi Todo guifg=#800000 guibg=#e0e090 gui=NONE |
||||
" NOTE THIS IS IN THE WARM SECTION |
||||
hi Error guifg=#c03000 guibg=NONE gui=NONE |
||||
hi Identifier guifg=#a030a0 guibg=NONE gui=NONE |
||||
hi ModeMsg guifg=fg guibg=#b0b0e0 gui=NONE |
||||
hi VisualNOS guifg=fg guibg=#b0b0e0 gui=NONE |
||||
hi SpecialKey guifg=#1050a0 guibg=NONE gui=NONE |
||||
hi NonText guifg=#002090 guibg=#d0d0d0 gui=NONE |
||||
hi Directory guifg=#a030a0 guibg=NONE gui=NONE |
||||
hi ErrorMsg guifg=fg guibg=#f0b090 gui=NONE |
||||
hi MoreMsg guifg=#489000 guibg=NONE gui=NONE |
||||
hi Title guifg=#a030a0 guibg=NONE gui=NONE |
||||
hi WarningMsg guifg=#b02000 guibg=NONE gui=NONE |
||||
hi WildMenu guifg=fg guibg=#d0d090 gui=NONE |
||||
hi Folded guifg=NONE guibg=#b0e0b0 gui=NONE |
||||
hi FoldColumn guifg=fg guibg=#90e090 gui=NONE |
||||
hi DiffAdd guifg=NONE guibg=#b0b0e0 gui=NONE |
||||
hi DiffChange guifg=NONE guibg=#e0b0e0 gui=NONE |
||||
hi DiffDelete guifg=#002090 guibg=#d0d0d0 gui=NONE |
||||
hi DiffText guifg=NONE guibg=#c0e080 gui=NONE |
||||
hi SignColumn guifg=fg guibg=#90e090 gui=NONE |
||||
|
||||
hi IncSearch guifg=White guibg=DarkRed gui=NONE |
||||
hi StatusLineNC guifg=fg guibg=#c0c0c0 gui=NONE |
||||
hi VertSplit guifg=fg guibg=#c0c0c0 gui=NONE |
||||
hi Underlined guifg=#6a5acd guibg=NONE gui=underline |
||||
hi Ignore guifg=bg guibg=NONE |
||||
" NOTE THIS IS IN THE WARM SECTION |
||||
if v:version >= 700 |
||||
if has('spell') |
||||
hi SpellBad guifg=NONE guibg=NONE guisp=#c03000 |
||||
hi SpellCap guifg=NONE guibg=NONE guisp=#2060a8 |
||||
hi SpellRare guifg=NONE guibg=NONE guisp=#a030a0 |
||||
hi SpellLocal guifg=NONE guibg=NONE guisp=#007068 |
||||
endif |
||||
hi Pmenu guifg=fg guibg=#e0b0e0 |
||||
hi PmenuSel guifg=#f0f0f0 guibg=#806060 gui=NONE |
||||
hi PmenuSbar guifg=fg guibg=#c0c0c0 gui=NONE |
||||
hi PmenuThumb guifg=fg guibg=#c0e080 gui=NONE |
||||
hi TabLine guifg=fg guibg=#c0c0c0 gui=NONE |
||||
hi TabLineFill guifg=fg guibg=#c0c0c0 gui=NONE |
||||
hi TabLineSel guifg=fg guibg=NONE gui=NONE |
||||
hi CursorColumn guifg=NONE guibg=#f0b090 |
||||
hi CursorLine guifg=NONE guibg=NONE gui=underline |
||||
hi MatchParen guifg=NONE guibg=#c0e080 |
||||
endif |
||||
|
||||
" LIGHT COLOR DEFINE END |
||||
|
||||
" Vim 7 added stuffs |
||||
if v:version >= 700 |
||||
hi Ignore gui=NONE |
||||
|
||||
" the gui=undercurl guisp could only support in Vim 7 |
||||
if has('spell') |
||||
hi SpellBad gui=undercurl |
||||
hi SpellCap gui=undercurl |
||||
hi SpellRare gui=undercurl |
||||
hi SpellLocal gui=undercurl |
||||
endif |
||||
hi TabLine gui=underline |
||||
hi TabLineFill gui=underline |
||||
hi CursorLine gui=underline |
||||
endif |
||||
|
||||
" For reversed stuffs, clear the reversed prop and set the bold prop again |
||||
hi IncSearch gui=bold |
||||
hi StatusLine gui=bold |
||||
hi StatusLineNC gui=bold |
||||
hi VertSplit gui=bold |
||||
hi Visual gui=bold |
||||
|
||||
" Enable the bold property |
||||
hi Question gui=bold |
||||
hi DiffText gui=bold |
||||
hi Statement gui=bold |
||||
hi Type gui=bold |
||||
hi MoreMsg gui=bold |
||||
hi ModeMsg gui=bold |
||||
hi NonText gui=bold |
||||
hi Title gui=bold |
||||
hi DiffDelete gui=bold |
||||
hi TabLineSel gui=bold |
||||
|
||||
" gui define for background=light end here |
||||
|
||||
" generally, a dumb terminal is dark, we assume the light terminal has 256 |
||||
" color support. |
||||
if &t_Co==8 || &t_Co==16 |
||||
set t_Co=256 |
||||
endif |
||||
if &t_Co==256 |
||||
" 256color light terminal support here |
||||
|
||||
hi Normal ctermfg=16 ctermbg=254 cterm=NONE |
||||
" Comment/Uncomment the following line to disable/enable transparency |
||||
"hi Normal ctermfg=16 ctermbg=NONE cterm=NONE |
||||
hi Search ctermfg=White ctermbg=DarkRed cterm=NONE |
||||
hi Visual ctermfg=NONE ctermbg=153 cterm=NONE |
||||
hi Cursor ctermfg=255 ctermbg=28 cterm=NONE |
||||
" hi CursorIM ctermfg=255 ctermbg=90 |
||||
hi Special ctermfg=94 ctermbg=NONE cterm=NONE |
||||
hi Comment ctermfg=58 ctermbg=NONE cterm=NONE |
||||
hi Number ctermfg=94 ctermbg=NONE cterm=NONE |
||||
hi Constant ctermfg=23 ctermbg=NONE cterm=NONE |
||||
hi StatusLine ctermfg=fg ctermbg=153 cterm=NONE |
||||
hi LineNr ctermfg=242 ctermbg=NONE cterm=NONE |
||||
hi Question ctermfg=fg ctermbg=186 cterm=NONE |
||||
hi PreProc ctermfg=29 ctermbg=NONE cterm=NONE |
||||
hi Statement ctermfg=25 ctermbg=NONE cterm=NONE |
||||
hi Type ctermfg=25 ctermbg=NONE cterm=NONE |
||||
hi Todo ctermfg=88 ctermbg=186 cterm=NONE |
||||
" NOTE THIS IS IN THE WARM SECTION |
||||
hi Error ctermfg=130 ctermbg=NONE cterm=NONE |
||||
hi Identifier ctermfg=133 ctermbg=NONE cterm=NONE |
||||
hi ModeMsg ctermfg=fg ctermbg=146 cterm=NONE |
||||
hi VisualNOS ctermfg=fg ctermbg=146 cterm=NONE |
||||
hi SpecialKey ctermfg=25 ctermbg=NONE cterm=NONE |
||||
hi NonText ctermfg=18 ctermbg=252 cterm=NONE |
||||
" Comment/Uncomment the following line to disable/enable transparency |
||||
"hi NonText ctermfg=18 ctermbg=NONE cterm=NONE |
||||
hi Directory ctermfg=133 ctermbg=NONE cterm=NONE |
||||
hi ErrorMsg ctermfg=fg ctermbg=216 cterm=NONE |
||||
hi MoreMsg ctermfg=64 ctermbg=NONE cterm=NONE |
||||
hi Title ctermfg=133 ctermbg=NONE cterm=NONE |
||||
hi WarningMsg ctermfg=124 ctermbg=NONE cterm=NONE |
||||
hi WildMenu ctermfg=fg ctermbg=186 cterm=NONE |
||||
hi Folded ctermfg=NONE ctermbg=151 cterm=NONE |
||||
hi FoldColumn ctermfg=fg ctermbg=114 cterm=NONE |
||||
hi DiffAdd ctermfg=NONE ctermbg=146 cterm=NONE |
||||
hi DiffChange ctermfg=NONE ctermbg=182 cterm=NONE |
||||
hi DiffDelete ctermfg=18 ctermbg=252 cterm=NONE |
||||
hi DiffText ctermfg=NONE ctermbg=150 cterm=NONE |
||||
hi SignColumn ctermfg=fg ctermbg=114 cterm=NONE |
||||
|
||||
hi IncSearch ctermfg=White ctermbg=DarkRed cterm=NONE |
||||
hi StatusLineNC ctermfg=fg ctermbg=250 cterm=NONE |
||||
hi VertSplit ctermfg=fg ctermbg=250 cterm=NONE |
||||
hi Underlined ctermfg=62 ctermbg=NONE cterm=underline |
||||
hi Ignore ctermfg=bg ctermbg=NONE |
||||
" NOTE THIS IS IN THE WARM SECTION |
||||
if v:version >= 700 |
||||
if has('spell') |
||||
if 0 |
||||
" ctermsp is not supported in Vim7, we ignore it. |
||||
hi SpellBad cterm=undercurl ctermbg=NONE ctermfg=130 |
||||
hi SpellCap cterm=undercurl ctermbg=NONE ctermfg=25 |
||||
hi SpellRare cterm=undercurl ctermbg=NONE ctermfg=133 |
||||
hi SpellLocal cterm=undercurl ctermbg=NONE ctermfg=23 |
||||
else |
||||
hi SpellBad cterm=undercurl ctermbg=NONE ctermfg=NONE |
||||
hi SpellCap cterm=undercurl ctermbg=NONE ctermfg=NONE |
||||
hi SpellRare cterm=undercurl ctermbg=NONE ctermfg=NONE |
||||
hi SpellLocal cterm=undercurl ctermbg=NONE ctermfg=NONE |
||||
endif |
||||
endif |
||||
hi Pmenu ctermfg=fg ctermbg=182 |
||||
hi PmenuSel ctermfg=255 ctermbg=95 cterm=NONE |
||||
hi PmenuSbar ctermfg=fg ctermbg=250 cterm=NONE |
||||
hi PmenuThumb ctermfg=fg ctermbg=150 cterm=NONE |
||||
hi TabLine ctermfg=fg ctermbg=250 cterm=NONE |
||||
hi TabLineFill ctermfg=fg ctermbg=250 cterm=NONE |
||||
hi TabLineSel ctermfg=fg ctermbg=NONE cterm=NONE |
||||
hi CursorColumn ctermfg=NONE ctermbg=216 |
||||
hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline |
||||
hi MatchParen ctermfg=NONE ctermbg=150 |
||||
endif |
||||
|
||||
hi TabLine cterm=underline |
||||
hi TabLineFill cterm=underline |
||||
hi CursorLine cterm=underline |
||||
|
||||
" For reversed stuffs, clear the reversed prop and set the bold prop again |
||||
hi IncSearch cterm=bold |
||||
hi StatusLine cterm=bold |
||||
hi StatusLineNC cterm=bold |
||||
hi VertSplit cterm=bold |
||||
hi Visual cterm=bold |
||||
|
||||
hi NonText cterm=bold |
||||
hi Question cterm=bold |
||||
hi Title cterm=bold |
||||
hi DiffDelete cterm=bold |
||||
hi DiffText cterm=bold |
||||
hi Statement cterm=bold |
||||
hi Type cterm=bold |
||||
hi MoreMsg cterm=bold |
||||
hi ModeMsg cterm=bold |
||||
hi TabLineSel cterm=bold |
||||
|
||||
"hi lCursor ctermfg=bg ctermbg=fg cterm=NONE |
||||
endif " t_Co==256 |
||||
" }}}2 |
||||
elseif &background=='dark' |
||||
" for background=dark {{{2 |
||||
" DARK COLOR DEFINE START |
||||
|
||||
hi Normal guifg=#d0d0d0 guibg=#202020 gui=NONE |
||||
hi Comment guifg=#d0d090 guibg=NONE gui=NONE |
||||
hi Constant guifg=#80c0e0 guibg=NONE gui=NONE |
||||
hi Number guifg=#e0c060 guibg=NONE gui=NONE |
||||
hi Identifier guifg=#f0c0f0 guibg=NONE gui=NONE |
||||
hi Statement guifg=#c0d8f8 guibg=NONE gui=NONE |
||||
hi PreProc guifg=#60f080 guibg=NONE gui=NONE |
||||
hi Type guifg=#b0d0f0 guibg=NONE gui=NONE |
||||
hi Special guifg=#e0c060 guibg=NONE gui=NONE |
||||
hi Error guifg=#f08060 guibg=NONE gui=NONE |
||||
hi Todo guifg=#800000 guibg=#d0d090 gui=NONE |
||||
hi Search guifg=White guibg=DarkRed gui=NONE |
||||
hi Visual guifg=#000000 guibg=#a6caf0 gui=NONE |
||||
hi Cursor guifg=#000000 guibg=#00f000 gui=NONE |
||||
" NOTE THIS IS IN THE COOL SECTION |
||||
" hi CursorIM guifg=#000000 guibg=#f000f0 gui=NONE |
||||
hi StatusLine guifg=#000000 guibg=#a6caf0 gui=NONE |
||||
hi LineNr guifg=#b0b0b0 guibg=NONE gui=NONE |
||||
hi Question guifg=#000000 guibg=#d0d090 gui=NONE |
||||
hi ModeMsg guifg=fg guibg=#000080 gui=NONE |
||||
hi VisualNOS guifg=fg guibg=#000080 gui=NONE |
||||
hi SpecialKey guifg=#b0d0f0 guibg=NONE gui=NONE |
||||
hi NonText guifg=#6080f0 guibg=#101010 gui=NONE |
||||
hi Directory guifg=#80c0e0 guibg=NONE gui=NONE |
||||
hi ErrorMsg guifg=#d0d090 guibg=#800000 gui=NONE |
||||
hi MoreMsg guifg=#c0e080 guibg=NONE gui=NONE |
||||
hi Title guifg=#f0c0f0 guibg=NONE gui=NONE |
||||
hi WarningMsg guifg=#f08060 guibg=NONE gui=NONE |
||||
hi WildMenu guifg=#000000 guibg=#d0d090 gui=NONE |
||||
hi Folded guifg=#aaaaaa guibg=#333333 gui=NONE |
||||
hi FoldColumn guifg=#e0e0e0 guibg=#333333 gui=NONE |
||||
hi DiffAdd guifg=NONE guibg=#000080 gui=NONE |
||||
hi DiffChange guifg=NONE guibg=#800080 gui=NONE |
||||
hi DiffDelete guifg=#6080f0 guibg=#202020 gui=NONE |
||||
hi DiffText guifg=#000000 guibg=#c0e080 gui=NONE |
||||
hi SignColumn guifg=#e0e0e0 guibg=#008000 gui=NONE |
||||
hi IncSearch guifg=White guibg=DarkRed gui=NONE |
||||
hi StatusLineNC guifg=#000000 guibg=#c0c0c0 gui=NONE |
||||
hi VertSplit guifg=#000000 guibg=#c0c0c0 gui=NONE |
||||
hi Underlined guifg=#80a0ff guibg=NONE gui=underline |
||||
hi Ignore guifg=#000000 guibg=NONE |
||||
" NOTE THIS IS IN THE COOL SECTION |
||||
if v:version >= 700 |
||||
if has('spell') |
||||
" the guisp= could only support in Vim 7 |
||||
hi SpellBad guifg=NONE guibg=NONE guisp=#f08060 |
||||
hi SpellCap guifg=NONE guibg=NONE guisp=#6080f0 |
||||
hi SpellRare guifg=NONE guibg=NONE guisp=#f0c0f0 |
||||
hi SpellLocal guifg=NONE guibg=NONE guisp=#c0d8f8 |
||||
endif |
||||
hi Pmenu guifg=fg guibg=#800080 |
||||
hi PmenuSel guifg=#000000 guibg=#d0d0d0 gui=NONE |
||||
hi PmenuSbar guifg=fg guibg=#000080 gui=NONE |
||||
hi PmenuThumb guifg=fg guibg=#008000 gui=NONE |
||||
hi TabLine guifg=fg guibg=#008000 gui=NONE |
||||
hi TabLineFill guifg=fg guibg=#008000 gui=NONE |
||||
hi TabLineSel guifg=fg guibg=NONE gui=NONE |
||||
hi CursorColumn guifg=NONE guibg=#800000 gui=NONE |
||||
hi CursorLine guifg=NONE guibg=NONE gui=underline |
||||
hi MatchParen guifg=NONE guibg=#800080 |
||||
endif |
||||
|
||||
" DARK COLOR DEFINE END |
||||
|
||||
" Vim 7 added stuffs |
||||
if v:version >= 700 |
||||
hi Ignore gui=NONE |
||||
|
||||
" the gui=undercurl could only support in Vim 7 |
||||
if has('spell') |
||||
hi SpellBad gui=undercurl |
||||
hi SpellCap gui=undercurl |
||||
hi SpellRare gui=undercurl |
||||
hi SpellLocal gui=undercurl |
||||
endif |
||||
hi TabLine gui=underline |
||||
hi TabLineFill gui=underline |
||||
hi Underlined gui=underline |
||||
hi CursorLine gui=underline |
||||
endif |
||||
|
||||
" gui define for background=dark end here |
||||
|
||||
if &t_Co==8 || &t_Co==16 |
||||
" for 8-color and 16-color term |
||||
hi Normal ctermfg=LightGrey ctermbg=Black |
||||
hi Special ctermfg=Yellow ctermbg=bg |
||||
hi Comment ctermfg=DarkYellow ctermbg=bg |
||||
hi Constant ctermfg=Blue ctermbg=bg |
||||
hi Number ctermfg=Yellow ctermbg=bg |
||||
hi LineNr ctermfg=DarkGrey ctermbg=bg |
||||
hi PreProc ctermfg=Green ctermbg=bg |
||||
hi Statement ctermfg=Cyan ctermbg=bg |
||||
hi Type ctermfg=Cyan ctermbg=bg |
||||
hi Error ctermfg=Red ctermbg=bg |
||||
hi Identifier ctermfg=Magenta ctermbg=bg |
||||
hi SpecialKey ctermfg=Cyan ctermbg=bg |
||||
hi NonText ctermfg=Blue ctermbg=bg |
||||
hi Directory ctermfg=Blue ctermbg=bg |
||||
hi MoreMsg ctermfg=Green ctermbg=bg |
||||
hi Title ctermfg=Magenta ctermbg=bg |
||||
hi WarningMsg ctermfg=Red ctermbg=bg |
||||
hi DiffDelete ctermfg=Blue ctermbg=bg |
||||
|
||||
hi Search ctermfg=NONE ctermbg=DarkRed |
||||
hi Visual ctermfg=Black ctermbg=DarkCyan |
||||
hi Cursor ctermfg=Black ctermbg=Green |
||||
hi StatusLine ctermfg=Black ctermbg=DarkCyan |
||||
hi Question ctermfg=Black ctermbg=DarkYellow |
||||
hi Todo ctermfg=DarkRed ctermbg=DarkYellow |
||||
hi Folded ctermfg=White ctermbg=DarkGreen |
||||
hi ModeMsg ctermfg=Grey ctermbg=DarkBlue |
||||
hi VisualNOS ctermfg=Grey ctermbg=DarkBlue |
||||
hi ErrorMsg ctermfg=DarkYellow ctermbg=DarkRed |
||||
hi WildMenu ctermfg=Black ctermbg=DarkYellow |
||||
hi FoldColumn ctermfg=White ctermbg=DarkGreen |
||||
hi SignColumn ctermfg=White ctermbg=DarkGreen |
||||
hi DiffText ctermfg=Black ctermbg=DarkYellow |
||||
|
||||
if v:version >= 700 |
||||
if has('spell') |
||||
hi SpellBad ctermfg=NONE ctermbg=DarkRed |
||||
hi SpellCap ctermfg=NONE ctermbg=DarkBlue |
||||
hi SpellRare ctermfg=NONE ctermbg=DarkMagenta |
||||
hi SpellLocal ctermfg=NONE ctermbg=DarkGreen |
||||
endif |
||||
hi Pmenu ctermfg=fg ctermbg=DarkMagenta |
||||
hi PmenuSel ctermfg=Black ctermbg=fg |
||||
hi PmenuSbar ctermfg=fg ctermbg=DarkBlue |
||||
hi PmenuThumb ctermfg=fg ctermbg=DarkGreen |
||||
hi TabLine ctermfg=fg ctermbg=DarkGreen cterm=underline |
||||
hi TabLineFill ctermfg=fg ctermbg=DarkGreen cterm=underline |
||||
hi CursorColumn ctermfg=NONE ctermbg=DarkRed |
||||
|
||||
hi TabLineSel ctermfg=fg ctermbg=bg |
||||
hi CursorLine ctermfg=NONE ctermbg=bg cterm=underline |
||||
|
||||
hi MatchParen ctermfg=NONE ctermbg=DarkMagenta |
||||
endif |
||||
if &t_Co==8 |
||||
" 8 colour terminal support, this assumes 16 colour is available through |
||||
" setting the 'bold' attribute, will get bright foreground colour. |
||||
" However, the bright background color is not available for 8-color terms. |
||||
" |
||||
" You can manually set t_Co=16 in your .vimrc to see if your terminal |
||||
" supports 16 colours, |
||||
hi DiffText cterm=none |
||||
hi Visual cterm=none |
||||
hi Cursor cterm=none |
||||
hi Comment cterm=none |
||||
hi Todo cterm=none |
||||
hi StatusLine cterm=none |
||||
hi Question cterm=none |
||||
hi DiffChange cterm=none |
||||
hi ModeMsg cterm=none |
||||
hi VisualNOS cterm=none |
||||
hi ErrorMsg cterm=none |
||||
hi WildMenu cterm=none |
||||
hi DiffAdd cterm=none |
||||
hi Folded cterm=none |
||||
hi DiffDelete cterm=none |
||||
hi Normal cterm=none |
||||
hi PmenuThumb cterm=none |
||||
hi Search cterm=bold |
||||
hi Special cterm=bold |
||||
hi Constant cterm=bold |
||||
hi Number cterm=bold |
||||
hi LineNr cterm=bold |
||||
hi PreProc cterm=bold |
||||
hi Statement cterm=bold |
||||
hi Type cterm=bold |
||||
hi Error cterm=bold |
||||
hi Identifier cterm=bold |
||||
hi SpecialKey cterm=bold |
||||
hi NonText cterm=bold |
||||
hi MoreMsg cterm=bold |
||||
hi Title cterm=bold |
||||
hi WarningMsg cterm=bold |
||||
hi FoldColumn cterm=bold |
||||
hi SignColumn cterm=bold |
||||
hi Directory cterm=bold |
||||
hi DiffDelete cterm=bold |
||||
else |
||||
" Background > 7 is only available with 16 or more colors |
||||
|
||||
hi WarningMsg cterm=none |
||||
hi Search cterm=none |
||||
hi Visual cterm=none |
||||
hi Cursor cterm=none |
||||
hi Special cterm=none |
||||
hi Comment cterm=none |
||||
hi Constant cterm=none |
||||
hi Number cterm=none |
||||
hi LineNr cterm=none |
||||
hi PreProc cterm=none |
||||
hi Todo cterm=none |
||||
hi Error cterm=none |
||||
hi Identifier cterm=none |
||||
hi Folded cterm=none |
||||
hi SpecialKey cterm=none |
||||
hi Directory cterm=none |
||||
hi ErrorMsg cterm=none |
||||
hi Normal cterm=none |
||||
hi PmenuThumb cterm=none |
||||
hi WildMenu cterm=none |
||||
hi FoldColumn cterm=none |
||||
hi SignColumn cterm=none |
||||
hi DiffAdd cterm=none |
||||
hi DiffChange cterm=none |
||||
hi Question cterm=none |
||||
hi StatusLine cterm=none |
||||
hi DiffText cterm=none |
||||
hi IncSearch cterm=reverse |
||||
hi StatusLineNC cterm=reverse |
||||
hi VertSplit cterm=reverse |
||||
|
||||
" Well, well, bold font with color 0-7 is not possible. |
||||
" So, the Question, StatusLine, DiffText cannot act as expected. |
||||
|
||||
hi Statement cterm=none |
||||
hi Type cterm=none |
||||
hi MoreMsg cterm=none |
||||
hi ModeMsg cterm=none |
||||
hi NonText cterm=none |
||||
hi Title cterm=none |
||||
hi VisualNOS cterm=none |
||||
hi DiffDelete cterm=none |
||||
hi TabLineSel cterm=none |
||||
|
||||
endif |
||||
elseif &t_Co==256 |
||||
" 256color dark terminal support here |
||||
hi Normal ctermfg=252 ctermbg=234 cterm=NONE |
||||
" Comment/Uncomment the following line to disable/enable transparency |
||||
"hi Normal ctermfg=252 ctermbg=NONE cterm=NONE |
||||
hi Comment ctermfg=186 ctermbg=NONE cterm=NONE |
||||
hi Constant ctermfg=110 ctermbg=NONE cterm=NONE |
||||
hi Number ctermfg=179 ctermbg=NONE cterm=NONE |
||||
hi Identifier ctermfg=219 ctermbg=NONE cterm=NONE |
||||
hi Statement ctermfg=153 ctermbg=NONE cterm=NONE |
||||
hi PreProc ctermfg=84 ctermbg=NONE cterm=NONE |
||||
hi Type ctermfg=153 ctermbg=NONE cterm=NONE |
||||
hi Special ctermfg=179 ctermbg=NONE cterm=NONE |
||||
hi Error ctermfg=209 ctermbg=NONE cterm=NONE |
||||
hi Todo ctermfg=88 ctermbg=186 cterm=NONE |
||||
hi Search ctermfg=White ctermbg=DarkRed cterm=NONE |
||||
hi Visual ctermfg=16 ctermbg=153 cterm=NONE |
||||
hi Cursor ctermfg=16 ctermbg=46 cterm=NONE |
||||
" NOTE THIS IS IN THE COOL SECTION |
||||
" hi CursorIM ctermfg=16 ctermbg=201 cterm=NONE |
||||
hi StatusLine ctermfg=16 ctermbg=153 cterm=NONE |
||||
hi LineNr ctermfg=249 ctermbg=NONE cterm=NONE |
||||
hi Question ctermfg=16 ctermbg=186 cterm=NONE |
||||
hi ModeMsg ctermfg=fg ctermbg=18 cterm=NONE |
||||
hi VisualNOS ctermfg=fg ctermbg=18 cterm=NONE |
||||
hi SpecialKey ctermfg=153 ctermbg=NONE cterm=NONE |
||||
hi NonText ctermfg=69 ctermbg=233 cterm=NONE |
||||
" Comment/Uncomment the following line to disable/enable transparency |
||||
"hi NonText ctermfg=69 ctermbg=NONE cterm=NONE |
||||
hi Directory ctermfg=110 ctermbg=NONE cterm=NONE |
||||
hi ErrorMsg ctermfg=186 ctermbg=88 cterm=NONE |
||||
hi MoreMsg ctermfg=150 ctermbg=NONE cterm=NONE |
||||
hi Title ctermfg=219 ctermbg=NONE cterm=NONE |
||||
hi WarningMsg ctermfg=209 ctermbg=NONE cterm=NONE |
||||
hi WildMenu ctermfg=16 ctermbg=186 cterm=NONE |
||||
hi Folded ctermfg=NONE ctermbg=22 cterm=NONE |
||||
hi FoldColumn ctermfg=254 ctermbg=28 cterm=NONE |
||||
hi DiffAdd ctermfg=NONE ctermbg=18 cterm=NONE |
||||
hi DiffChange ctermfg=NONE ctermbg=90 cterm=NONE |
||||
hi DiffDelete ctermfg=69 ctermbg=234 cterm=NONE |
||||
hi DiffText ctermfg=16 ctermbg=150 cterm=NONE |
||||
hi SignColumn ctermfg=254 ctermbg=28 cterm=NONE |
||||
hi IncSearch ctermfg=White ctermbg=DarkRed cterm=NONE |
||||
hi StatusLineNC ctermfg=16 ctermbg=250 cterm=NONE |
||||
hi VertSplit ctermfg=16 ctermbg=250 cterm=NONE |
||||
hi Underlined ctermfg=111 ctermbg=NONE cterm=underline |
||||
hi Ignore ctermfg=16 ctermbg=NONE |
||||
" NOTE THIS IS IN THE COOL SECTION |
||||
if v:version >= 700 |
||||
if has('spell') |
||||
" the ctermsp= is not supported in Vim 7 we simply ignored |
||||
if 0 |
||||
hi SpellBad cterm=undercurl ctermbg=NONE ctermfg=209 |
||||
hi SpellCap cterm=undercurl ctermbg=NONE ctermfg=69 |
||||
hi SpellRare cterm=undercurl ctermbg=NONE ctermfg=219 |
||||
hi SpellLocal cterm=undercurl ctermbg=NONE ctermfg=153 |
||||
else |
||||
hi SpellBad cterm=undercurl ctermbg=NONE ctermfg=NONE |
||||
hi SpellCap cterm=undercurl ctermbg=NONE ctermfg=NONE |
||||
hi SpellRare cterm=undercurl ctermbg=NONE ctermfg=NONE |
||||
hi SpellLocal cterm=undercurl ctermbg=NONE ctermfg=NONE |
||||
endif |
||||
endif |
||||
hi Pmenu ctermfg=fg ctermbg=90 |
||||
hi PmenuSel ctermfg=16 ctermbg=252 cterm=NONE |
||||
hi PmenuSbar ctermfg=fg ctermbg=18 cterm=NONE |
||||
hi PmenuThumb ctermfg=fg ctermbg=28 cterm=NONE |
||||
hi TabLine ctermfg=fg ctermbg=28 cterm=NONE |
||||
hi TabLineFill ctermfg=fg ctermbg=28 cterm=NONE |
||||
hi TabLineSel ctermfg=fg ctermbg=NONE cterm=NONE |
||||
hi CursorColumn ctermfg=NONE ctermbg=88 cterm=NONE |
||||
hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline |
||||
hi MatchParen ctermfg=NONE ctermbg=90 |
||||
hi TabLine cterm=underline |
||||
hi TabLineFill cterm=underline |
||||
hi Underlined cterm=underline |
||||
hi CursorLine cterm=underline |
||||
endif |
||||
|
||||
endif " t_Co |
||||
|
||||
" }}}2 |
||||
endif |
||||
|
||||
" Links: |
||||
" |
||||
" COLOR LINKS DEFINE START |
||||
|
||||
hi link String Constant |
||||
" Character must be different from strings because in many languages |
||||
" (especially C, C++) a 'char' variable is scalar while 'string' is pointer, |
||||
" mistaken a 'char' for a 'string' will cause disaster! |
||||
hi link Character Number |
||||
hi link SpecialChar LineNr |
||||
hi link Tag Identifier |
||||
hi link cCppOut LineNr |
||||
" The following are not standard hi links, |
||||
" these are used by DrChip |
||||
hi link Warning MoreMsg |
||||
hi link Notice Constant |
||||
" these are used by Calendar |
||||
hi link CalToday PreProc |
||||
" these are used by TagList |
||||
hi link MyTagListTagName IncSearch |
||||
hi link MyTagListTagScope Constant |
||||
|
||||
" COLOR LINKS DEFINE END |
||||
|
||||
" vim:et:nosta:sw=2:ts=8: |
||||
" vim600:fdm=marker:fdl=1: |
@ -0,0 +1 @@ |
||||
Subproject commit fb8387fd066e9757e53727131a6d197cecf4bb55 |
@ -0,0 +1 @@ |
||||
Subproject commit d6dcb9b0fb5beac9e84cfb84c1917b7e0df5850f |
@ -0,0 +1 @@ |
||||
Subproject commit d605010cab695dca64c5cd9bf8bbcc8db9864815 |
@ -0,0 +1 @@ |
||||
Subproject commit 8ebc225b364887c0557ab47ab2ca752a70123bee |
@ -0,0 +1 @@ |
||||
Subproject commit 9895285042a2fd5691b2f6582aa979e4d1bdffea |
@ -0,0 +1 @@ |
||||
Subproject commit 8c75e65b647238febd0257658b150f717a136359 |
@ -0,0 +1 @@ |
||||
Subproject commit b1035a2c6d29a80ea7fd44077814d0bbfc9cdba7 |
@ -0,0 +1 @@ |
||||
Subproject commit 2cb0fc78fb4c7a1db5f51c042a447cc50f09983d |
@ -0,0 +1 @@ |
||||
Subproject commit 248da77ebe1f017fdf7572a1988dbdf75ecab19c |
@ -0,0 +1 @@ |
||||
Subproject commit ddeeaa7a1d091165213a101e5de29f34463aacd8 |
@ -0,0 +1 @@ |
||||
Subproject commit d1bfbc589944fcb84af887aec79074d80a327f4c |
@ -0,0 +1 @@ |
||||
Subproject commit 7d488a2e5368c02912d427e2fd9e351bb7afc998 |
@ -0,0 +1 @@ |
||||
Subproject commit b31111e14ceac0160a1703030fbbaae5656bee4c |
@ -0,0 +1 @@ |
||||
Subproject commit 3f52de449280badc57c0d41014e64d051166e741 |
@ -0,0 +1 @@ |
||||
Subproject commit 394d5d61c30784b44d059d8768537e435dc8cf64 |
@ -0,0 +1 @@ |
||||
Subproject commit 489a1e8c676ad47dd358dbf883bfaf492148d38b |
@ -0,0 +1 @@ |
||||
Used for temp dirs/files such as undodir |
@ -0,0 +1,390 @@ |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" Maintainer: |
||||
" Amir Salihefendic |
||||
" http://amix.dk - amix@amix.dk |
||||
" |
||||
" Version: |
||||
" 5.0 - 29/05/12 15:43:36 |
||||
" |
||||
" Blog_post: |
||||
" http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github |
||||
" |
||||
" Syntax_highlighted: |
||||
" http://amix.dk/vim/vimrc.html |
||||
" |
||||
" Raw_version: |
||||
" http://amix.dk/vim/vimrc.txt |
||||
" |
||||
" Awesome_version: |
||||
" Get this config, nice color schemes and lots of plugins! |
||||
" https://github.com/amix/vimrc |
||||
" |
||||
" Sections: |
||||
" -> General |
||||
" -> VIM user interface |
||||
" -> Colors and Fonts |
||||
" -> Files and backups |
||||
" -> Text, tab and indent related |
||||
" -> Visual mode related |
||||
" -> Moving around, tabs and buffers |
||||
" -> Status line |
||||
" -> Editing mappings |
||||
" -> vimgrep searching and cope displaying |
||||
" -> Spell checking |
||||
" -> Misc |
||||
" -> Helper functions |
||||
" |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => General |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" Sets how many lines of history VIM has to remember |
||||
set history=700 |
||||
|
||||
" Enable filetype plugins |
||||
filetype plugin on |
||||
filetype indent on |
||||
|
||||
" Set to auto read when a file is changed from the outside |
||||
set autoread |
||||
|
||||
" With a map leader it's possible to do extra key combinations |
||||
" like <leader>w saves the current file |
||||
let mapleader = "," |
||||
let g:mapleader = "," |
||||
|
||||
" Fast saving |
||||
nmap <leader>w :w!<cr> |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => VIM user interface |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" Set 7 lines to the cursor - when moving vertically using j/k |
||||
set so=7 |
||||
|
||||
" Turn on the WiLd menu |
||||
set wildmenu |
||||
|
||||
" Ignore compiled files |
||||
set wildignore=*.o,*~,*.pyc |
||||
|
||||
"Always show current position |
||||
set ruler |
||||
|
||||
" Height of the command bar |
||||
set cmdheight=2 |
||||
|
||||
" A buffer becomes hidden when it is abandoned |
||||
set hid |
||||
|
||||
" Configure backspace so it acts as it should act |
||||
set backspace=eol,start,indent |
||||
set whichwrap+=<,>,h,l |
||||
|
||||
" Ignore case when searching |
||||
set ignorecase |
||||
|
||||
" When searching try to be smart about cases |
||||
set smartcase |
||||
|
||||
" Highlight search results |
||||
set hlsearch |
||||
|
||||
" Makes search act like search in modern browsers |
||||
set incsearch |
||||
|
||||
" Don't redraw while executing macros (good performance config) |
||||
set lazyredraw |
||||
|
||||
" For regular expressions turn magic on |
||||
set magic |
||||
|
||||
" Show matching brackets when text indicator is over them |
||||
set showmatch |
||||
" How many tenths of a second to blink when matching brackets |
||||
set mat=2 |
||||
|
||||
" No annoying sound on errors |
||||
set noerrorbells |
||||
set novisualbell |
||||
set t_vb= |
||||
set tm=500 |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => Colors and Fonts |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" Enable syntax highlighting |
||||
syntax enable |
||||
|
||||
colorscheme desert |
||||
set background=dark |
||||
|
||||
" Set extra options when running in GUI mode |
||||
if has("gui_running") |
||||
set guioptions-=T |
||||
set guioptions+=e |
||||
set t_Co=256 |
||||
set guitablabel=%M\ %t |
||||
endif |
||||
|
||||
" Set utf8 as standard encoding and en_US as the standard language |
||||
set encoding=utf8 |
||||
|
||||
" Use Unix as the standard file type |
||||
set ffs=unix,dos,mac |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => Files, backups and undo |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" Turn backup off, since most stuff is in SVN, git et.c anyway... |
||||
set nobackup |
||||
set nowb |
||||
set noswapfile |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => Text, tab and indent related |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" Use spaces instead of tabs |
||||
set expandtab |
||||
|
||||
" Be smart when using tabs ;) |
||||
set smarttab |
||||
|
||||
" 1 tab == 4 spaces |
||||
set shiftwidth=4 |
||||
set tabstop=4 |
||||
|
||||
" Linebreak on 500 characters |
||||
set lbr |
||||
set tw=500 |
||||
|
||||
set ai "Auto indent |
||||
set si "Smart indent |
||||
set wrap "Wrap lines |
||||
|
||||
|
||||
"""""""""""""""""""""""""""""" |
||||
" => Visual mode related |
||||
"""""""""""""""""""""""""""""" |
||||
" Visual mode pressing * or # searches for the current selection |
||||
" Super useful! From an idea by Michael Naumann |
||||
vnoremap <silent> * :call VisualSelection('f')<CR> |
||||
vnoremap <silent> # :call VisualSelection('b')<CR> |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => Moving around, tabs, windows and buffers |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" Treat long lines as break lines (useful when moving around in them) |
||||
map j gj |
||||
map k gk |
||||
|
||||
" Map <Space> to / (search) and Ctrl-<Space> to ? (backwards search) |
||||
map <space> / |
||||
map <c-space> ? |
||||
map <silent> <leader><cr> :noh<cr> |
||||
|
||||
" Smart way to move between windows |
||||
map <C-j> <C-W>j |
||||
map <C-k> <C-W>k |
||||
map <C-h> <C-W>h |
||||
map <C-l> <C-W>l |
||||
|
||||
" Close the current buffer |
||||
map <leader>bd :Bclose<cr> |
||||
|
||||
" Close all the buffers |
||||
map <leader>ba :1,1000 bd!<cr> |
||||
|
||||
" Useful mappings for managing tabs |
||||
map <leader>tn :tabnew<cr> |
||||
map <leader>to :tabonly<cr> |
||||
map <leader>tc :tabclose<cr> |
||||
map <leader>tm :tabmove |
||||
|
||||
" Opens a new tab with the current buffer's path |
||||
" Super useful when editing files in the same directory |
||||
map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/ |
||||
|
||||
" Switch CWD to the directory of the open buffer |
||||
map <leader>cd :cd %:p:h<cr>:pwd<cr> |
||||
|
||||
" Specify the behavior when switching between buffers |
||||
try |
||||
set switchbuf=useopen,usetab,newtab |
||||
set stal=2 |
||||
catch |
||||
endtry |
||||
|
||||
" Return to last edit position when opening files (You want this!) |
||||
autocmd BufReadPost * |
||||
\ if line("'\"") > 0 && line("'\"") <= line("$") | |
||||
\ exe "normal! g`\"" | |
||||
\ endif |
||||
" Remember info about open buffers on close |
||||
set viminfo^=% |
||||
|
||||
|
||||
"""""""""""""""""""""""""""""" |
||||
" => Status line |
||||
"""""""""""""""""""""""""""""" |
||||
" Always show the status line |
||||
set laststatus=2 |
||||
|
||||
" Format the status line |
||||
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => Editing mappings |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" Remap VIM 0 to first non-blank character |
||||
map 0 ^ |
||||
|
||||
" Move a line of text using ALT+[jk] or Comamnd+[jk] on mac |
||||
nmap <M-j> mz:m+<cr>`z |
||||
nmap <M-k> mz:m-2<cr>`z |
||||
vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z |
||||
vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z |
||||
|
||||
if has("mac") || has("macunix") |
||||
nmap <D-j> <M-j> |
||||
nmap <D-k> <M-k> |
||||
vmap <D-j> <M-j> |
||||
vmap <D-k> <M-k> |
||||
endif |
||||
|
||||
" Delete trailing white space on save, useful for Python and CoffeeScript ;) |
||||
func! DeleteTrailingWS() |
||||
exe "normal mz" |
||||
%s/\s\+$//ge |
||||
exe "normal `z" |
||||
endfunc |
||||
autocmd BufWrite *.py :call DeleteTrailingWS() |
||||
autocmd BufWrite *.coffee :call DeleteTrailingWS() |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => vimgrep searching and cope displaying |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" When you press gv you vimgrep after the selected text |
||||
vnoremap <silent> gv :call VisualSelection('gv')<CR> |
||||
|
||||
" Some useful keys for vimgrep |
||||
map <leader>g :vimgrep // **/*.<left><left><left><left><left><left><left> |
||||
|
||||
" Leader space vimgreps in the current file |
||||
map <leader><space> :vimgrep // <C-R>%<C-A><right><right><right><right><right><right><right><right><right> |
||||
|
||||
" When you press <leader>r you can search and replace the selected text |
||||
vnoremap <silent> <leader>r :call VisualSelection('replace')<CR> |
||||
|
||||
" Do :help cope if you are unsure what cope is. It's super useful! |
||||
" |
||||
" When you search with vimgrep, display your results in cope by doing: |
||||
" <leader>cc |
||||
" |
||||
" To go to the next search result do: |
||||
" <leader>n |
||||
" |
||||
" To go to the previous search results do: |
||||
" <leader>p |
||||
" |
||||
map <leader>cc :botright cope<cr> |
||||
map <leader>co ggVGy:tabnew<cr>:set syntax=qf<cr>pgg |
||||
map <leader>n :cn<cr> |
||||
map <leader>p :cp<cr> |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => Spell checking |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" Pressing ,ss will toggle and untoggle spell checking |
||||
map <leader>ss :setlocal spell!<cr> |
||||
|
||||
" Shortcuts using <leader> |
||||
map <leader>sn ]s |
||||
map <leader>sp [s |
||||
map <leader>sa zg |
||||
map <leader>s? z= |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => Misc |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" Remove the Windows ^M - when the encodings gets messed up |
||||
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm |
||||
|
||||
" Quickly open a buffer for scripbble |
||||
map <leader>q :e ~/buffer<cr> |
||||
|
||||
" Toggle paste mode on and off |
||||
map <leader>pp :setlocal paste!<cr> |
||||
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => Helper functions |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
function! CmdLine(str) |
||||
exe "menu Foo.Bar :" . a:str |
||||
emenu Foo.Bar |
||||
unmenu Foo |
||||
endfunction |
||||
|
||||
function! VisualSelection(direction) range |
||||
let l:saved_reg = @" |
||||
execute "normal! vgvy" |
||||
|
||||
let l:pattern = escape(@", '\\/.*$^~[]') |
||||
let l:pattern = substitute(l:pattern, "\n$", "", "") |
||||
|
||||
if a:direction == 'b' |
||||
execute "normal ?" . l:pattern . "^M" |
||||
elseif a:direction == 'gv' |
||||
call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.') |
||||
elseif a:direction == 'replace' |
||||
call CmdLine("%s" . '/'. l:pattern . '/') |
||||
elseif a:direction == 'f' |
||||
execute "normal /" . l:pattern . "^M" |
||||
endif |
||||
|
||||
let @/ = l:pattern |
||||
let @" = l:saved_reg |
||||
endfunction |
||||
|
||||
|
||||
" Returns true if paste mode is enabled |
||||
function! HasPaste() |
||||
if &paste |
||||
return 'PASTE MODE ' |
||||
en |
||||
return '' |
||||
endfunction |
||||
|
||||
" Don't close window, when deleting a buffer |
||||
command! Bclose call <SID>BufcloseCloseIt() |
||||
function! <SID>BufcloseCloseIt() |
||||
let l:currentBufNum = bufnr("%") |
||||
let l:alternateBufNum = bufnr("#") |
||||
|
||||
if buflisted(l:alternateBufNum) |
||||
buffer # |
||||
else |
||||
bnext |
||||
endif |
||||
|
||||
if bufnr("%") == l:currentBufNum |
||||
new |
||||
endif |
||||
|
||||
if buflisted(l:currentBufNum) |
||||
execute("bdelete! ".l:currentBufNum) |
||||
endif |
||||
endfunction |
@ -0,0 +1,145 @@ |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" Important: |
||||
" This requries that you install https://github.com/amix/vimrc ! |
||||
" |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => GUI related |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
set background=dark |
||||
|
||||
if has("gui_running") |
||||
colorscheme peaksea |
||||
else |
||||
colorscheme ir_black |
||||
endif |
||||
|
||||
" Set font according to system |
||||
if has("mac") || has("macunix") |
||||
set gfn=Menlo:h14 |
||||
set shell=/bin/bash |
||||
elseif has("win16") || has("win32") |
||||
set gfn=Bitstream\ Vera\ Sans\ Mono:h10 |
||||
elseif has("linux") |
||||
set gfn=Monospace\ 10 |
||||
set shell=/bin/bash |
||||
endif |
||||
|
||||
" Open MacVim in fullscreen mode |
||||
if has("gui_macvim") |
||||
set fuoptions=maxvert,maxhorz |
||||
au GUIEnter * set fullscreen |
||||
endif |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => Fast editing and reloading of vimrc configs |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
if has("win16") || has("win32") |
||||
map <leader>e :e! ~/_vim_runtime/vimrcs/vimrc_my_configs.vim<cr> |
||||
autocmd! bufwritepost vimrc source ~/_vim_runtime/vimrcs/vimrc_my_configs.vim |
||||
else |
||||
map <leader>e :e! ~/.vim_runtime/vimrcs/vimrc_my_configs.vim<cr> |
||||
autocmd! bufwritepost vimrc source ~/.vim_runtime/vimrcs/vimrc_my_configs.vim |
||||
endif |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => Turn persistent undo on |
||||
" means that you can undo even when you close a buffer/VIM |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
try |
||||
if has("win16") || has("win32") |
||||
set undodir=~/_vim_runtime/temp_dirs/undodir |
||||
else |
||||
set undodir=~/.vim_runtime/temp_dirs/undodir |
||||
endif |
||||
|
||||
set undofile |
||||
catch |
||||
endtry |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => Command mode related |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" Smart mappings on the command line |
||||
cno $h e ~/ |
||||
cno $d e ~/Desktop/ |
||||
cno $j e ./ |
||||
cno $c e <C-\>eCurrentFileDir("e")<cr> |
||||
|
||||
" $q is super useful when browsing on the command line |
||||
" it deletes everything until the last slash |
||||
cno $q <C-\>eDeleteTillSlash()<cr> |
||||
|
||||
" Bash like keys for the command line |
||||
cnoremap <C-A> <Home> |
||||
cnoremap <C-E> <End> |
||||
cnoremap <C-K> <C-U> |
||||
|
||||
cnoremap <C-P> <Up> |
||||
cnoremap <C-N> <Down> |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => Parenthesis/bracket expanding |
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
vnoremap $1 <esc>`>a)<esc>`<i(<esc> |
||||
vnoremap $2 <esc>`>a]<esc>`<i[<esc> |
||||
vnoremap $3 <esc>`>a}<esc>`<i{<esc> |
||||
vnoremap $$ <esc>`>a"<esc>`<i"<esc> |
||||
vnoremap $q <esc>`>a'<esc>`<i'<esc> |
||||
vnoremap $e <esc>`>a"<esc>`<i"<esc> |
||||
|
||||
" Map auto complete of (, ", ', [ |
||||
inoremap $1 ()<esc>i |
||||
inoremap $2 []<esc>i |
||||
inoremap $3 {}<esc>i |
||||
inoremap $4 {<esc>o}<esc>O |
||||
inoremap $q ''<esc>i |
||||
inoremap $e ""<esc>i |
||||
inoremap $t <><esc>i |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => General abbreviations |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
iab xdate <c-r>=strftime("%d/%m/%y %H:%M:%S")<cr> |
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => Omni complete functions |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
autocmd FileType css set omnifunc=csscomplete#CompleteCSS |
||||
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" => Helper functions |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
func! DeleteTillSlash() |
||||
let g:cmd = getcmdline() |
||||
|
||||
if has("win16") || has("win32") |
||||
let g:cmd_edited = substitute(g:cmd, "\\(.*\[\\\\]\\).*", "\\1", "") |
||||
else |
||||
let g:cmd_edited = substitute(g:cmd, "\\(.*\[/\]\\).*", "\\1", "") |
||||
endif |
||||
|
||||
if g:cmd == g:cmd_edited |
||||
if has("win16") || has("win32") |
||||
let g:cmd_edited = substitute(g:cmd, "\\(.*\[\\\\\]\\).*\[\\\\\]", "\\1", "") |
||||
else |
||||
let g:cmd_edited = substitute(g:cmd, "\\(.*\[/\]\\).*/", "\\1", "") |
||||
endif |
||||
endif |
||||
|
||||
return g:cmd_edited |
||||
endfunc |
||||
|
||||
func! CurrentFileDir(cmd) |
||||
return a:cmd . " " . expand("%:p:h") . "/" |
||||
endfunc |
@ -0,0 +1,54 @@ |
||||
"""""""""""""""""""""""""""""" |
||||
" => Python section |
||||
"""""""""""""""""""""""""""""" |
||||
let python_highlight_all = 1 |
||||
au FileType python syn keyword pythonDecorator True None False self |
||||
|
||||
au BufNewFile,BufRead *.jinja set syntax=htmljinja |
||||
au BufNewFile,BufRead *.mako set ft=mako |
||||
|
||||
au FileType python map <buffer> F :set foldmethod=indent<cr> |
||||
|
||||
au FileType python inoremap <buffer> $r return |
||||
au FileType python inoremap <buffer> $i import |
||||
au FileType python inoremap <buffer> $p print |
||||
au FileType python inoremap <buffer> $f #--- PH ----------------------------------------------<esc>FP2xi |
||||
au FileType python map <buffer> <leader>1 /class |
||||
au FileType python map <buffer> <leader>2 /def |
||||
au FileType python map <buffer> <leader>C ?class |
||||
au FileType python map <buffer> <leader>D ?def |
||||
|
||||
|
||||
"""""""""""""""""""""""""""""" |
||||
" => JavaScript section |
||||
""""""""""""""""""""""""""""""" |
||||
au FileType javascript call JavaScriptFold() |
||||
au FileType javascript setl fen |
||||
au FileType javascript setl nocindent |
||||
|
||||
au FileType javascript imap <c-t> AJS.log();<esc>hi |
||||
au FileType javascript imap <c-a> alert();<esc>hi |
||||
|
||||
au FileType javascript inoremap <buffer> $r return |
||||
au FileType javascript inoremap <buffer> $f //--- PH ----------------------------------------------<esc>FP2xi |
||||
|
||||
function! JavaScriptFold() |
||||
setl foldmethod=syntax |
||||
setl foldlevelstart=1 |
||||
syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend |
||||
|
||||
function! FoldText() |
||||
return substitute(getline(v:foldstart), '{.*', '{...}', '') |
||||
endfunction |
||||
setl foldtext=FoldText() |
||||
endfunction |
||||
|
||||
|
||||
"""""""""""""""""""""""""""""" |
||||
" => CoffeeScript section |
||||
""""""""""""""""""""""""""""""" |
||||
function! CoffeeScriptFold() |
||||
setl foldmethod=indent |
||||
setl foldlevelstart=1 |
||||
endfunction |
||||
au FileType coffee call CoffeeScriptFold() |
@ -0,0 +1,84 @@ |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
" Important: |
||||
" This requries that you install https://github.com/amix/vimrc ! |
||||
" |
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
||||
|
||||
|
||||
"""""""""""""""""""""""""""""" |
||||
" => Load pathogen paths |
||||
"""""""""""""""""""""""""""""" |
||||
call pathogen#infect('~/.vim_runtime/sources_plugins') |
||||
call pathogen#infect('~/.vim_runtime/sources_forked') |
||||
call pathogen#infect('~/.vim_runtime/sources_colors') |
||||
call pathogen#infect('~/.vim_runtime/sources_misc') |
||||
|
||||
|
||||
"""""""""""""""""""""""""""""" |
||||
" => bufExplorer plugin |
||||
"""""""""""""""""""""""""""""" |
||||
let g:bufExplorerDefaultHelp=0 |
||||
let g:bufExplorerShowRelativePath=1 |
||||
let g:bufExplorerFindActive=1 |
||||
let g:bufExplorerSortBy='name' |
||||
map <leader>o :BufExplorer<cr> |
||||
|
||||
|
||||
"""""""""""""""""""""""""""""" |
||||
" => MRU plugin |
||||
"""""""""""""""""""""""""""""" |
||||
let MRU_Max_Entries = 400 |
||||
map <leader>f :MRU<CR> |
||||
|
||||
|
||||
"""""""""""""""""""""""""""""" |
||||
" => YankRing |
||||
"""""""""""""""""""""""""""""" |
||||
if has("win16") || has("win32") |
||||
let g:yankring_history_dir = '~/_vim_runtime/temp_dirs/' |
||||
else |
||||
let g:yankring_history_dir = '~/.vim_runtime/temp_dirs/' |
||||
endif |
||||
|
||||
|
||||
"""""""""""""""""""""""""""""" |
||||
" => CTRL-P |
||||
"""""""""""""""""""""""""""""" |
||||
let g:ctrlp_working_path_mode = 0 |
||||