aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--_vimrc73
1 files changed, 16 insertions, 57 deletions
diff --git a/_vimrc b/_vimrc
index e17b825..11c06ba 100644
--- a/_vimrc
+++ b/_vimrc
@@ -1,32 +1,9 @@
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Maintainer:
-" Amir Salihefendic — @amix3k
-"
-" Awesome_version:
-" Get this config, nice color schemes and lots of plugins!
-"
-" Install the awesome version from:
-"
-" 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
-"
+" Credit:
+" Amir Salihefendic — @amix3k
+" https://github.com/amix/vimrc/blob/master/vimrcs/basic.vim
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -56,30 +33,20 @@ command W w !sudo tee % > /dev/null
" => VIM user interface
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Set 7 lines to the cursor - when moving vertically using j/k
-set so=7
-
-" Avoid garbled characters in Chinese language windows OS
-let $LANG='en'
-set langmenu=en
-source $VIMRUNTIME/delmenu.vim
-source $VIMRUNTIME/menu.vim
+set scrolloff=7
" Turn on the Wild menu
set wildmenu
" Ignore compiled files
set wildignore=*.o,*~,*.pyc
-if has("win16") || has("win32")
- set wildignore+=.git\*,.hg\*,.svn\*
-else
- set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
-endif
+set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
"Always show current position
set ruler
" Height of the command bar
-set cmdheight=2
+set cmdheight=1
" A buffer becomes hidden when it is abandoned
set hid
@@ -122,7 +89,6 @@ if has("gui_macvim")
autocmd GUIEnter * set vb t_vb=
endif
-
" Add a bit extra margin to the left
set foldcolumn=1
@@ -172,23 +138,19 @@ 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
+set tabstop=8
" Linebreak on 500 characters
set lbr
set tw=500
-set ai "Auto indent
-set si "Smart indent
-set wrap "Wrap lines
+set autoindent
+set smartindent
+set wrap
""""""""""""""""""""""""""""""
@@ -247,8 +209,8 @@ 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
+ set switchbuf=useopen,usetab,newtab
+ set stal=2
catch
endtry
@@ -269,9 +231,6 @@ set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Editing mappings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Remap VIM 0 to first non-blank character
-map 0 ^
-
" Move a line of text using ALT+[jk] or Command+[jk] on mac
nmap <M-j> mz:m+<cr>`z
nmap <M-k> mz:m-2<cr>`z
@@ -279,10 +238,10 @@ 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>
+ 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 some filetypes ;)