-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
85 lines (70 loc) · 2.86 KB
/
vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
" Vim Configuration
" Author- Anup Nivargi
" ~/.vimrc
" =================================================================================================
"
call pathogen#infect()
set nocompatible " Load VIM in nocompatible mode to use enhanced features
set shell=/bin/bash " Set the shell path
set history=700 " Set Command history
filetype plugin indent on " Enable filetype plugin and indentation
set autoread " Update file when changed from outside
set hidden " Handle multpile buffers better
"Ignore directories and files
"Version Control Files
set wildignore+=.git,.svn
"Images
set wildignore+=*.png,*.jpg,*.jpeg,*.gif,*.bmp
"Other
set wildignore+=*.swf,*.air,*.psd,*.ttf,*.woff,*.svg,*.eot
"Tmp and Log
set wildignore+=tmp,log
" Visual Information
set showmode " Show the current mode
set stl=%f\ %m\ %r\ Line:%l/%L[%p%%]\ Col:%c\ Buf:%n\ [%b][0x%B]
set number " Show line numbers
set wildmenu " Enhanced command line completition
set laststatus=2 " Show status line all the time. Takes a extra line on the screen
set cmdheight=2 " The commandbar height
"set ruler " Always show current position
"Set the tag file search order
set tags=./tags;
" Error handeling
set noerrorbells
set novisualbell
" Visual Enhancement
syntax enable " Enable syntax highlighting
set cursorline " Highlight the cursor line
set showmatch " Highlight matching bracets
set magic " Set magic on, for regular expressions
" Backups
set nobackup
set nowritebackup
set noswapfile
" Tabs and indentation
set expandtab " Use spaces instead if tabs
set autoindent " Auto indent
set smartindent " Smart indent
set shiftwidth=2 " Maintain 2 level indentation
set tabstop=2 " 2 level indentation for Tab
set wrap linebreak textwidth=0 " Wrap lines
" Search
set ignorecase " Case insensitive search
set smartcase " Case sensitive when search contains capital
set hlsearch " Highlight search things
set incsearch " Incremental search
" autocmd! bufwritepost vimrc source ~/.vim_runtime/vimrc
" Aliases
let mapleader = ","
map <leader>n o<ESC><CR>
map <A-j> gj
map <A-k> gk
map <F12> :NERDTreeToggle<CR>
"Use F5 to auto indent full file and jump to last cursor position
map <silent> <F5> mmgg=G'm
"Use F5 to auto indent full file and jump to last cursor position in insert
"mode
imap <silent> <F5> <Esc> mmgg=G'm
"Command-T automatically open selected files in new tabs
let g:CommandTAcceptSelectionMap = '<C-t>'
let g:CommandTAcceptSelectionTabMap = '<CR>'