-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc_old
More file actions
125 lines (106 loc) · 3.46 KB
/
vimrc_old
File metadata and controls
125 lines (106 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
set nocompatible " break away from old vi compatibility
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" This is the Vundle package, which can be found on GitHub.
" " For GitHub repos, you specify plugins using the
" " 'user/repository' format
Plugin 'gmarik/vundle'
"
" " We could also add repositories with a ".git" extension
Plugin 'scrooloose/nerdtree.git'
"
" " To get plugins from Vim Scripts, you can reference the plugin
" " by name as it appears on the site
Plugin 'Buffergator'
Plugin 'altercation/vim-colors-solarized'
Plugin 'tomasr/molokai'
Plugin 'flazz/vim-colorschemes'
Plugin 'jlanzarotta/bufexplorer'
"Plugin 'kien/ctrlp' i've installed this manually
Plugin 'tpope/vim-fugitive'
"
" " Now we can turn our filetype functionality back on
" filetype plugin indent on
filetype plugin indent on
set tabstop=4
set laststatus=2
"let g:airline_powerline_fonts = 1
"let g:airline_section_b = '%{strftime("%c)}'
"let g:airline_section_y = 'BN: %{bufnr("%")}'
set incsearch
" Automatically cd into the directory that the file is in
execute pathogen#infect()
set autochdir
" highlight current line
"set cul
" adjust color
hi CursorLine term=none cterm=none ctermbg=3
set showcmd
set showmatch
set ignorecase
set smartcase
set ttyfast
set hlsearch
nore ; :
set nobackup
imap ii <C-[>
set fileformats=unix,dos,mac " support all three newline formats
set viminfo= " don't use or save viminfo files
set noerrorbells
set wildmenu
function! InsertStatuslineColor(mode)
if a:mode == 'i'
hi statusline guibg=Cyan ctermfg=6 guifg=Black ctermbg=0
elseif a:mode == 'r'
hi statusline guibg=Purple ctermfg=5 guifg=Black ctermbg=0
else
hi statusline guibg=DarkRed ctermfg=1 guifg=Black ctermbg=0
endif
endfunction
au InsertEnter * call InsertStatuslineColor(v:insertmode)
au InsertLeave * hi statusline guibg=DarkGrey ctermfg=8 guifg=White ctermbg=15
" default the statusline to green when entering Vim
hi statusline guibg=DarkGrey ctermfg=8 guifg=White ctermbg=15
" Formats the statusline
set statusline=%f " file name
set statusline+=[%{strlen(&fenc)?&fenc:'none'}, "file encoding
set statusline+=%{&ff}] "file format
set statusline+=%y "filetype
set statusline+=%h "help file flag
set statusline+=%m "modified flag
set statusline+=%r "read only flag
" get this working!
" Puts in the current git status
"if count(g:pathogen_disabled, 'Fugitive') < 1
" set statusline+=%{fugitive#statusline()}
"endif
" Puts in syntastic warnings
" if count(g:pathogen_disabled, 'Syntastic') < 1
" set statusline+=%#warningmsg#
" set statusline+=%{SyntasticStatuslineFlag()}
" set statusline+=%*
" endif
set statusline+=\ %= " align left
set statusline+=Line:%l/%L[%p%%] " line X of Y [percent of file]
set statusline+=\ Col:%c " current column
set statusline+=\ Buf:%n " Buffer number
set statusline+=\ [%b][0x%B]\ " ASCII and byte code under cursor
let mapleader=','
set relativenumber
syntax on
" set width of NERDTree side bar
let g:NERDTreeWinSize = 40
set number
"set colorscheme
set background=dark
"colorscheme solarized
colorscheme abra
"ctrl-p install stuff
set runtimepath^=~/.vim/bundle/ctrlp.vim
"turn off ctrlp from setting it's pwd
let g:ctrlp_working_path_mode = 0
"set shortcut for nerd tree
nmap <leader>ne :NERDTree<cr>
map <silent> <C-n> :NERDTreeFocus<CR>
map <silent> <C-n> :NERDTreeToggle<CR>