diff options
| author | Miquel Sabaté <mikisabate@gmail.com> | 2013-12-10 14:19:44 +0100 |
|---|---|---|
| committer | Miquel Sabaté <mikisabate@gmail.com> | 2013-12-10 14:19:44 +0100 |
| commit | 2c2a6a68c20672fdca8781a47034aec281bde812 (patch) | |
| tree | 57f56f0f590e6097c45bd15bd6d30e8b49726d8e | |
| parent | 7c6d0f4a33e1ebffe370541cd4620db6dcc9a439 (diff) | |
| download | dotfiles-2c2a6a68c20672fdca8781a47034aec281bde812.tar.gz dotfiles-2c2a6a68c20672fdca8781a47034aec281bde812.zip | |
vim: updated the vimrc file
| -rw-r--r-- | vimrc | 54 |
1 files changed, 51 insertions, 3 deletions
@@ -1,18 +1,65 @@ +"" " Basics + +filetype on set nocompatible syntax on set encoding=utf-8 +"" " Vim UI + +" Show matched result. set showmatch + +" Don't show the current command in the lower right corner. set showcmd -set ruler +" Show numbers. +set number + +" Don't show the mode, since this will be shown by the status line. +set noshowmode + +"" +" Colorscheme + +set background=dark +colorscheme xoria256 + +"" +" Status line + +" Returns the mode we are currently. +function! Mode() + redraw + let l:mode = mode() + + if mode ==# "n" | return "NORMAL" + elseif mode ==# "i" | return "INSERT" + elseif mode ==# "R" | return "REPLACE" + elseif mode ==# "v" | return "VISUAL" + elseif mode ==# "V" | return "VISUAL-LINE" + elseif mode ==# "" | return "VISUAL-BLOCK" + else | return l:mode + endif +endfunc + +" My own status line. +set stl=\ %{Mode()}\ \|\ %f\ %m\ %r\ %=\ Line:\ %l\ Column:\ %v\ Buf:#%n + +" Always show the status line. +set laststatus=2 + +"" " Text Formatting/Layout + set ignorecase set smartcase +"" " Tabs, Indentation + set textwidth=79 set tabstop=2 set shiftwidth=2 @@ -22,7 +69,9 @@ set smarttab set expandtab set backspace=indent,eol,start +"" " Filetypes + filetype off filetype indent plugin off set runtimepath+=$GOROOT/misc/vim @@ -33,9 +82,8 @@ autocmd FileType c set shiftwidth=4 tabstop=4 autocmd FileType yacc set shiftwidth=4 tabstop=4 autocmd FileType go set shiftwidth=4 tabstop=4 -" +"" " Re-mappings -" let mapleader = "," |
