Created
July 12, 2011 16:58
-
-
Save kiero/1078417 to your computer and use it in GitHub Desktop.
Vim configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set nocompatible " no compatible with vi | |
| let mapleader=',' " change the mapleader form \ to , | |
| map <Leader>n :NERDTreeToggle<CR> | |
| filetype plugin indent on | |
| set hidden " hide buffer instead of closing it | |
| set encoding=utf-8 | |
| set number " show line numbers | |
| set tabstop=2 " tab is two spaces now | |
| set expandtab " insert space characters whenever the tab key is pressed | |
| set showmatch " set show matching brackets | |
| set ignorecase " ignore case when searching | |
| set smartcase " ignore case if search pattern is all lowercase, | |
| " case-sensitive otherwise | |
| set hlsearch " highlight search terms | |
| set incsearch " show search matches as you type | |
| set ruler " show the cursor position all the time | |
| set history=100 " remember more commands and search history | |
| set undolevels=200 " use many levels of undo | |
| set wildignore=*.old,*.class | |
| set title " change the terminal's title | |
| set autoindent | |
| " don't let Vim write a backup file | |
| set nobackup | |
| set noswapfile | |
| " temporarily switching to paste mode by pressing F2 | |
| set pastetoggle=<F5> | |
| " write command with using ; as well as : | |
| nnoremap ; : | |
| " Easy window navigation | |
| map <C-h> <C-w>h | |
| map <C-j> <C-w>j | |
| map <C-k> <C-w>k | |
| map <C-l> <C-w>l | |
| " turn off search highlight wih ,/ | |
| nmap <silent> ,/ :nohlsearch<CR> | |
| " Map <F2> to toggle the NERDTree | |
| map <F2> :NERDTreeToggle<CR> | |
| " Tab switching with <F3> & <F4> | |
| map <F3> :tabp<CR> | |
| map <F4> :tabn<CR> | |
| " No more toolbar in MacVim | |
| if has("gui_running") | |
| set guioptions=egmrt | |
| endif | |
| " No more scrollbars in MacVim (even when using NERDTree) | |
| :set guioptions-=L | |
| " Snippets settings | |
| :set omnifunc=csscomplete#CompleteCSS | |
| " Colorscheme and font | |
| set gfn=Monaco:h12:cANSI | |
| colorscheme rdark | |
| syntax on " turn on syntax highlighting |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment