|
@@ -6,17 +6,6 @@ set nocompatible "Don't have to try to be compatible with old vi
|
|
|
call pathogen#infect()
|
|
call pathogen#infect()
|
|
|
|
|
|
|
|
|
|
|
|
|
-""""""""
|
|
|
|
|
-"" Start Up
|
|
|
|
|
-"""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
|
-function! StartUp()
|
|
|
|
|
- " Stuff in here will be called by autocmd below
|
|
|
|
|
- if 0 == argc()
|
|
|
|
|
- NERDTree
|
|
|
|
|
- end
|
|
|
|
|
-endfunction
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
""""""""
|
|
""""""""
|
|
|
"" General Behaviours
|
|
"" General Behaviours
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
@@ -27,8 +16,10 @@ set splitright "New splits appear right of current window
|
|
|
set ttyfast "Smooth movement
|
|
set ttyfast "Smooth movement
|
|
|
|
|
|
|
|
" Persistent undo
|
|
" Persistent undo
|
|
|
-set undofile
|
|
|
|
|
-set undodir=~/.vimundo
|
|
|
|
|
|
|
+if has("persistent_undo")
|
|
|
|
|
+ set undofile
|
|
|
|
|
+ set undodir=~/.vimundo
|
|
|
|
|
+endif
|
|
|
|
|
|
|
|
"if version >= 700
|
|
"if version >= 700
|
|
|
" set mouse=a "mouse support for 7.x, but don't use this if we use screen
|
|
" set mouse=a "mouse support for 7.x, but don't use this if we use screen
|
|
@@ -45,6 +36,10 @@ if has("autocmd")
|
|
|
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
|
|
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
|
|
|
\ exe "normal! g'\"" |
|
|
\ exe "normal! g'\"" |
|
|
|
\ endif
|
|
\ endif
|
|
|
|
|
+
|
|
|
|
|
+ autocmd WinEnter * setlocal cursorline
|
|
|
|
|
+ autocmd WinLeave * setlocal nocursorline
|
|
|
|
|
+
|
|
|
" Source the vimrc file after saving it
|
|
" Source the vimrc file after saving it
|
|
|
autocmd bufwritepost .vimrc source $MYVIMRC
|
|
autocmd bufwritepost .vimrc source $MYVIMRC
|
|
|
" so far, this startup just opens NERDTree when there are no arguments
|
|
" so far, this startup just opens NERDTree when there are no arguments
|
|
@@ -53,6 +48,18 @@ else
|
|
|
set autoindent on
|
|
set autoindent on
|
|
|
endif
|
|
endif
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+""""""""
|
|
|
|
|
+"" Start Up
|
|
|
|
|
+"""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
|
+function! StartUp()
|
|
|
|
|
+ " Stuff in here will be called by autocmd below
|
|
|
|
|
+ if 0 == argc()
|
|
|
|
|
+ "NERDTree
|
|
|
|
|
+ end
|
|
|
|
|
+endfunction
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
""""""""
|
|
""""""""
|
|
|
"" Tabs and Text Formatting
|
|
"" Tabs and Text Formatting
|
|
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
@@ -73,11 +80,11 @@ set textwidth=80
|
|
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
|
|
|
|
syntax enable
|
|
syntax enable
|
|
|
|
|
+colorscheme solarized
|
|
|
set t_Co=16
|
|
set t_Co=16
|
|
|
set background=dark
|
|
set background=dark
|
|
|
-colorscheme solarized
|
|
|
|
|
-hi Folded ctermfg=darkred "set colour for folded lines
|
|
|
|
|
set colorcolumn=+1
|
|
set colorcolumn=+1
|
|
|
|
|
+hi Folded ctermfg=darkred "set colour for folded lines
|
|
|
|
|
|
|
|
|
|
|
|
|
""""""""
|
|
""""""""
|
|
@@ -96,7 +103,7 @@ set laststatus=2 "always show a status line
|
|
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
|
|
|
|
set foldmethod=indent
|
|
set foldmethod=indent
|
|
|
-set foldlevel=7
|
|
|
|
|
|
|
+set foldlevel=10
|
|
|
set foldtext=MyFoldText()
|
|
set foldtext=MyFoldText()
|
|
|
|
|
|
|
|
function! MyFoldText()
|
|
function! MyFoldText()
|
|
@@ -140,10 +147,13 @@ nmap <leader>k O<Esc>j
|
|
|
|
|
|
|
|
" Toggle numbering
|
|
" Toggle numbering
|
|
|
nmap <silent> <leader>n :set number!<CR>
|
|
nmap <silent> <leader>n :set number!<CR>
|
|
|
|
|
+" Toggle paste with/without indenting
|
|
|
nmap <silent> <leader>p :set paste! paste?<CR>
|
|
nmap <silent> <leader>p :set paste! paste?<CR>
|
|
|
|
|
+" Toggle showing whitespace characters
|
|
|
|
|
+nmap <silent> <leader>l :set list! <CR>
|
|
|
|
|
|
|
|
" Toggle NERDTree instead of the normal dir browser
|
|
" Toggle NERDTree instead of the normal dir browser
|
|
|
-nmap <silent> <leader>d :NERDTreeToggle<CR>
|
|
|
|
|
|
|
+map <silent> <leader>d :NERDTreeToggle<CR>
|
|
|
|
|
|
|
|
" Toggle Commenting out lines with NERDCommenter
|
|
" Toggle Commenting out lines with NERDCommenter
|
|
|
nnoremap <silent> <leader>, :call NERDComment(0, "toggle")<CR>
|
|
nnoremap <silent> <leader>, :call NERDComment(0, "toggle")<CR>
|