-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc.vim
83 lines (74 loc) · 2.82 KB
/
vimrc.vim
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
source ~/.vim/bundle/vim-pathogen/autoload/pathogen.vim
call pathogen#infect()
set nocompatible " use vim defaults
set ls=2 " allways show status line
set tabstop=4 " numbers of spaces of tab character
set shiftwidth=4 " numbers of spaces to (auto)indent
set scrolloff=3 " keep 3 lines when scrolling
set showcmd " display incomplete commands
set hlsearch " highlight searches
set incsearch " do incremental searching
set ruler " show the cursor position all the time
set laststatus=2
set visualbell t_vb= " turn off error beep/flash
set novisualbell " turn off visual bell
"set nobackup " do not keep a backup file
"set number " show line numbers
set numberwidth=4 " line numbering takes up 5 spaces
set ignorecase " ignore case when searching
set nowrap " stop lines from wrapping
set noignorecase " don't ignore case
set notitle " don't show "Thanks for flying vim"
set ttyfast " smoother changes
set bs=2 " Backspace can delete previous characters
set modeline " last lines in document sets vim mode
set modelines=3 " number lines checked for modelines
set shortmess=atI " Abbreviate messages
set nostartofline " don't jump to first character when paging
set whichwrap=b,s,h,l,<,>,[,] " move freely between files
set undolevels=200
set cpoptions=$cF
set wildignore=*.o,*.obj,*.bak,*.exe,*.pyc,*.DS_Store,*.db
set statusline=%F%m%r%h%w\ [TYPE=%Y\ %{&ff}]\ [%l/%L\ (%p%%)]
filetype plugin indent on " turn on the indent plugins
set noautoindent " turn off by default, enable for specific filetypes
set nosmartindent " turn off by default, enable for specific filetypes
set nocindent " turn off by default, enable for specific filetypes
:nmap <C-N><C-N> :set invnumber<CR>
syntax enable
set background=dark
"colorscheme solarized
set mouse=a
map <C-e> :NERDTreeToggle<CR>:NERDTreeMirror<CR>
map <leader>e :NERDTreeFind<CR>
nmap <leader>nt :NERDTreeFind<CR>
let g:NERDTreeWinSize = 60
function! InitializeDirectories()
let separator = "."
let parent = $HOME
let prefix = '.vim'
let dir_list = {
\ 'backup': 'backupdir',
\ 'views': 'viewdir',
\ 'swap': 'directory' }
for [dirname, settingname] in items(dir_list)
let directory = parent . '/' . prefix . dirname . "/"
if exists("*mkdir")
if !isdirectory(directory)
call mkdir(directory)
endif
endif
if !isdirectory(directory)
echo "Warning: Unable to create backup directory: " . directory
echo "Try: mkdir -p " . directory
else
let directory = substitute(directory, " ", "\\\\ ", "")
exec "set " . settingname . "=" . directory
endif
endfor
endfunction
call InitializeDirectories()
" Use local vimrc if available
if filereadable(expand("~/.vimrc.local"))
source ~/.vimrc.local
endif