-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Just pathogen and solarized with custom vimrc.
- Loading branch information
0 parents
commit 541915e
Showing
6 changed files
with
286 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.netrwhist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "vim/bundle/solarized"] | ||
path = vim/bundle/solarized | ||
url = https://github.com/altercation/vim-colors-solarized |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
install: | ||
ln -s `pwd`/vimrc $(HOME)/.vimrc | ||
ln -s `pwd`/vim $(HOME)/.vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
" pathogen.vim - path option manipulation | ||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> | ||
" Version: 1.3 | ||
|
||
" Install in ~/.vim/autoload (or ~\vimfiles\autoload). | ||
" | ||
" API is documented below. | ||
|
||
if exists("g:loaded_pathogen") || &cp | ||
finish | ||
endif | ||
let g:loaded_pathogen = 1 | ||
|
||
" Split a path into a list. | ||
function! pathogen#split(path) abort " {{{1 | ||
if type(a:path) == type([]) | return a:path | endif | ||
let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,') | ||
return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")') | ||
endfunction " }}}1 | ||
|
||
" Convert a list to a path. | ||
function! pathogen#join(...) abort " {{{1 | ||
if type(a:1) == type(1) && a:1 | ||
let i = 1 | ||
let space = ' ' | ||
else | ||
let i = 0 | ||
let space = '' | ||
endif | ||
let path = "" | ||
while i < a:0 | ||
if type(a:000[i]) == type([]) | ||
let list = a:000[i] | ||
let j = 0 | ||
while j < len(list) | ||
let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g') | ||
let path .= ',' . escaped | ||
let j += 1 | ||
endwhile | ||
else | ||
let path .= "," . a:000[i] | ||
endif | ||
let i += 1 | ||
endwhile | ||
return substitute(path,'^,','','') | ||
endfunction " }}}1 | ||
|
||
" Convert a list to a path with escaped spaces for 'path', 'tag', etc. | ||
function! pathogen#legacyjoin(...) abort " {{{1 | ||
return call('pathogen#join',[1] + a:000) | ||
endfunction " }}}1 | ||
|
||
" Remove duplicates from a list. | ||
function! pathogen#uniq(list) abort " {{{1 | ||
let i = 0 | ||
let seen = {} | ||
while i < len(a:list) | ||
if has_key(seen,a:list[i]) | ||
call remove(a:list,i) | ||
else | ||
let seen[a:list[i]] = 1 | ||
let i += 1 | ||
endif | ||
endwhile | ||
return a:list | ||
endfunction " }}}1 | ||
|
||
" \ on Windows unless shellslash is set, / everywhere else. | ||
function! pathogen#separator() abort " {{{1 | ||
return !exists("+shellslash") || &shellslash ? '/' : '\' | ||
endfunction " }}}1 | ||
|
||
" Convenience wrapper around glob() which returns a list. | ||
function! pathogen#glob(pattern) abort " {{{1 | ||
let files = split(glob(a:pattern),"\n") | ||
return map(files,'substitute(v:val,"[".pathogen#separator()."/]$","","")') | ||
endfunction "}}}1 | ||
|
||
" Like pathogen#glob(), only limit the results to directories. | ||
function! pathogen#glob_directories(pattern) abort " {{{1 | ||
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)') | ||
endfunction "}}}1 | ||
|
||
" Checks if a bundle is 'disabled'. A bundle is considered 'disabled' if | ||
" its 'basename()' is included in g:pathogen_disabled[]'. | ||
function! pathogen#is_disabled(path) " {{{1 | ||
if !exists("g:pathogen_disabled") | ||
return 0 | ||
endif | ||
let sep = pathogen#separator() | ||
return index(g:pathogen_disabled, strpart(a:path, strridx(a:path, sep)+1)) != -1 | ||
endfunction "}}}1 | ||
|
||
" Prepend all subdirectories of path to the rtp, and append all 'after' | ||
" directories in those subdirectories. | ||
function! pathogen#runtime_prepend_subdirectories(path) " {{{1 | ||
let sep = pathogen#separator() | ||
let before = filter(pathogen#glob_directories(a:path.sep."*[^~]"), '!pathogen#is_disabled(v:val)') | ||
let after = filter(pathogen#glob_directories(a:path.sep."*[^~]".sep."after"), '!pathogen#is_disabled(v:val[0:-7])') | ||
let rtp = pathogen#split(&rtp) | ||
let path = expand(a:path) | ||
call filter(rtp,'v:val[0:strlen(path)-1] !=# path') | ||
let &rtp = pathogen#join(pathogen#uniq(before + rtp + after)) | ||
return &rtp | ||
endfunction " }}}1 | ||
|
||
" For each directory in rtp, check for a subdirectory named dir. If it | ||
" exists, add all subdirectories of that subdirectory to the rtp, immediately | ||
" after the original directory. If no argument is given, 'bundle' is used. | ||
" Repeated calls with the same arguments are ignored. | ||
function! pathogen#runtime_append_all_bundles(...) " {{{1 | ||
let sep = pathogen#separator() | ||
let name = a:0 ? a:1 : 'bundle' | ||
if "\n".s:done_bundles =~# "\\M\n".name."\n" | ||
return "" | ||
endif | ||
let s:done_bundles .= name . "\n" | ||
let list = [] | ||
for dir in pathogen#split(&rtp) | ||
if dir =~# '\<after$' | ||
let list += filter(pathogen#glob_directories(substitute(dir,'after$',name,'').sep.'*[^~]'.sep.'after'), '!pathogen#is_disabled(v:val[0:-7])') + [dir] | ||
else | ||
let list += [dir] + filter(pathogen#glob_directories(dir.sep.name.sep.'*[^~]'), '!pathogen#is_disabled(v:val)') | ||
endif | ||
endfor | ||
let &rtp = pathogen#join(pathogen#uniq(list)) | ||
return 1 | ||
endfunction | ||
|
||
let s:done_bundles = '' | ||
" }}}1 | ||
|
||
" Invoke :helptags on all non-$VIM doc directories in runtimepath. | ||
function! pathogen#helptags() " {{{1 | ||
for dir in pathogen#split(&rtp) | ||
if dir[0 : strlen($VIMRUNTIME)-1] !=# $VIMRUNTIME && filewritable(dir.'/doc') == 2 && !empty(glob(dir.'/doc/*')) && (!filereadable(dir.'/doc/tags') || filewritable(dir.'/doc/tags')) | ||
helptags `=dir.'/doc'` | ||
endif | ||
endfor | ||
endfunction " }}}1 | ||
|
||
command! -bar Helptags :call pathogen#helptags() | ||
|
||
" vim:set ft=vim ts=8 sw=2 sts=2: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
" We don't like plain vi | ||
set nocompatible | ||
filetype off | ||
|
||
" Initialize pathogen | ||
call pathogen#helptags() | ||
call pathogen#runtime_append_all_bundles() | ||
|
||
let mapleader="," | ||
|
||
set hidden | ||
set wrap " wrap lines | ||
set softtabstop=4 | ||
set tabstop=4 " a tab is four spaces | ||
set backspace=indent,eol,start | ||
set expandtab | ||
set nofoldenable | ||
set autoindent " always set autoindenting on | ||
set copyindent " copy the previous indentation on autoindenting | ||
set shiftwidth=4 " number of spaces to use for autoindenting | ||
set shiftround " use multiple of shiftwidth when indenting with '<' and '>' | ||
set showmatch " set show matching parenthesis | ||
set smartcase " ignore case if search pattern is all lowercase, | ||
" case-sensitive otherwise | ||
set smarttab " insert tabs on the start of a line according to | ||
" shiftwidth, not tabstop | ||
set hlsearch " highlight search terms | ||
set incsearch " show search matches as you type | ||
set scrolloff=4 " keep 4 lines off the edges of the screen when scrolling | ||
|
||
set history=1000 " remember more commands and search history | ||
set undolevels=1000 " use many muchos levels of undo | ||
set wildignore=*.swp,*.bak,*.pyc,*.class | ||
set title " change the terminal's title | ||
set visualbell " don't beep | ||
set noerrorbells " don't beep | ||
set vb t_vb= | ||
set tildeop " make tilde (flip case) an operator | ||
|
||
set nobackup | ||
set noswapfile | ||
set wildmenu " tab completion in ex mode | ||
set ruler " lines, cols in status line | ||
set showmode " current mode in status line | ||
|
||
set showcmd " display the number of chars in v-mode | ||
set laststatus=0 " no extra status lines | ||
set shortmess=atI | ||
set display=lastline,uhex | ||
set mouse=a | ||
set confirm | ||
set ttimeoutlen=100 | ||
set clipboard+=unnamed | ||
set fileencodings=ucs-bom,utf-8,latin1,default | ||
|
||
" Activate filetype | ||
filetype on | ||
filetype plugin on | ||
filetype plugin indent on | ||
|
||
" Maps | ||
nmap <silent> <leader>ev :e $MYVIMRC<CR> | ||
nmap <silent> <leader>sv :so $MYVIMRC<CR> | ||
nnoremap ; : | ||
nmap <silent> <leader>/ :nohlsearch<CR> | ||
" w!! saves file under sudo | ||
cmap w!! w !sudo tee % >/dev/null | ||
" Key mapping for Russian QWERTY keyboard in UTF-8 | ||
map й q | ||
map ц w | ||
map у e | ||
map к r | ||
map е t | ||
map н y | ||
map г u | ||
map ш i | ||
map щ o | ||
map з p | ||
map х [ | ||
map ъ ] | ||
map ф a | ||
map ы s | ||
map в d | ||
map а f | ||
map п g | ||
map р h | ||
map о j | ||
map л k | ||
map д l | ||
map ж ; | ||
map э ' | ||
map я z | ||
map ч x | ||
map с c | ||
map м v | ||
map и b | ||
map т n | ||
map ь m | ||
map б , | ||
map ю . | ||
map Ж : | ||
let g:netrw_list_hide = '.*\.swp$,.*\.pyc$,\.svn$,^\.[A-Za-z].*' | ||
|
||
if has("gui_running") | ||
"" Tweak GUI options | ||
set guioptions=aegimLt | ||
set go-=M | ||
set go-=m | ||
set go-=L | ||
set number | ||
"" Use 256 colours | ||
set t_Co=256 | ||
"" Size of GUI version windows | ||
set columns=84 lines=60 | ||
"" Highlight current line | ||
set cursorline | ||
endif | ||
|
||
if &t_Co >= 256 || has("gui_running") | ||
set background=light | ||
colorscheme solarized | ||
endif | ||
|
||
if &t_Co > 2 || has("gui_running") | ||
" switch syntax highlighting on, when the terminal has colors | ||
syntax on | ||
endif | ||
|
||
if filereadable($HOME.'/.vimrc.local') | ||
source ~/.vimrc.local | ||
endif |