-
-
Save aikchun/7729705 to your computer and use it in GitHub Desktop.
vimrc
This file contains 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
let mapleader="," | |
" load plugins | |
execute pathogen#infect() | |
let g:EasyMotion_leader_key = '<Leader>' | |
map <F2> :NERDTreeToggle<CR> | |
let NERDTreeShowLineNumbers=1 | |
let NERDTreeShowHidden=1 | |
" General configuration | |
" Basic settings | |
cd ~ | |
set nowrap | |
set mouse=a | |
set backspace=2 | |
set relativenumber | |
filetype plugin indent on | |
syntax on | |
set nocompatible | |
set wildmenu | |
set wildmode=list:longest,full | |
set hlsearch | |
set incsearch | |
set ic | |
"set list | |
"set listchars=tab:\|\ | |
"" To change tab to space use expandtab | |
set tabstop=4 shiftwidth=4 noexpandtab | |
" Functions | |
function! NumberToggle() | |
if(&relativenumber == 1) | |
set norelativenumber | |
set number | |
else | |
set nonumber | |
set relativenumber | |
endif | |
endfunc | |
" mappings | |
map <F3> :vsplit $MYVIMRC<CR> | |
map <F4> :so $MYVIMRC<CR> | |
set pastetoggle=<F5> | |
nnoremap Q <nop> | |
nnoremap <Leader>h :noh<return><esc> | |
nnoremap <C-N> :call NumberToggle()<CR> | |
nnoremap <C-K> :tabn<CR> | |
nnoremap <C-J> :tabp<CR> | |
inoremap jk <ESC> | |
vnoremap <C-C> "+ygv"*y | |
" Theme settings | |
set background=dark | |
let g:molokai_original=1 | |
if has("gui_running") | |
set cursorline | |
set gfn=Inconsolata\ 13 | |
colorscheme molokai | |
else | |
set cursorline | |
set t_Co=256 | |
let g:rehash256=1 | |
colorscheme molokai | |
endif | |
" " Uncomment this section if not using vim on servers. | |
" | |
" "" Enable Ctrl+s to save file { | |
" "" REMEMBER TO DISABLE <C-S> in .bashrc by adding stty stop undef | |
" nnoremap <C-S> :update<CR> | |
" vnoremap <C-S> <C-C>:update<CR> | |
" inoremap <C-S> <C-O>:update<CR> | |
" "" } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment