Commit d97bd9047ef9e86185e25fe536012b9f2c4041e1

Authored by Ian Foster
Exists in master

Merge branch 'master' of github.com:lanrat/dotfiles

Showing 1 changed file Inline Diff

" ########################################## 1 1 " ##########################################
" Vim Settings 2 2 " Vim Settings
" ########################################## 3 3 " ##########################################
4 4
" This setting prevents vim from emulating the original vi's bugs and limitations. 5 5 " This setting prevents vim from emulating the original vi's bugs and limitations.
set nocompatible 6 6 set nocompatible
7 7
" Remove Lag 8 8 " Remove Lag
set ttyfast 9 9 set ttyfast
10 10
" Map ; to : in normal mode for mega-easy vim commands. 11 11 " Map ; to : in normal mode for mega-easy vim commands.
nnoremap ; : 12 12 nnoremap ; :
13 13
" Encoding 14 14 " Encoding
set encoding=utf-8 " Set file encoding 15 15 set encoding=utf-8 " Set file encoding
"set termencoding=utf-8 16 16 "set termencoding=utf-8
17 17
"The first setting tells vim to use 'autoindent' (that is, use the current 18 18 "The first setting tells vim to use 'autoindent' (that is, use the current
"line's indent level to set the indent level of new lines). The second makes 19 19 "line's indent level to set the indent level of new lines). The second makes
"vim attempt to intelligently guess the indent level of any new line based on 20 20 "vim attempt to intelligently guess the indent level of any new line based on
"the previous line, assuming the source file is in a C-like language. 21 21 "the previous line, assuming the source file is in a C-like language.
"Combined, they are very useful in writing well-formatted source code. 22 22 "Combined, they are very useful in writing well-formatted source code.
set autoindent 23 23 set autoindent
set smartindent 24 24 set smartindent
25 25
"Use 4-space tabs. The first setting sets up 4-space 26 26 "Use 4-space tabs. The first setting sets up 4-space
"tabs, and the second tells vi to use 4 spaces when text is indented 27 27 "tabs, and the second tells vi to use 4 spaces when text is indented
set tabstop=4 28 28 set tabstop=4
set shiftwidth=4 "indent width for autoindent 29 29 set shiftwidth=4 "indent width for autoindent
set expandtab " no real tabs please, turn tabs into whitespace 30 30 set expandtab " no real tabs please, turn tabs into whitespace
set shiftround " when at 3 spaces, and I hit > ... go to 4, not 5 31 31 set shiftround " when at 3 spaces, and I hit > ... go to 4, not 5
set softtabstop=4 " when hitting tab or backspace, how many spaces should a tab be (see expandtab) 32 32 set softtabstop=4 " when hitting tab or backspace, how many spaces should a tab be (see expandtab)
filetype plugin indent on "indent depends on filetype 33 33 filetype plugin indent on "indent depends on filetype
34 34
"ignore whitespace in vimdiff 35 35 "ignore whitespace in vimdiff
if &diff 36 36 if &diff
" diff mode 37 37 " diff mode
set diffopt+=iwhite 38 38 set diffopt+=iwhite
endif 39 39 endif
40 40
"allow tabs on makefiles 41 41 "allow tabs on makefiles
autocmd FileType make setlocal noexpandtab 42 42 autocmd FileType make setlocal noexpandtab
43 43
"aura cmp files 44 44 "aura cmp files
au BufNewFile,BufRead *.cmp set filetype=html 45 45 au BufNewFile,BufRead *.cmp set filetype=html
46 46
" show matching brackets 47 47 " show matching brackets
set showmatch 48 48 set showmatch
49 49
"This setting ensures that each window contains a statusline that displays the 50 50 "This setting ensures that each window contains a statusline that displays the
"current cursor position. 51 51 "current cursor position.
set ruler 52 52 set ruler
53 53
"With this nifty option, vim will search for text as you enter it. 54 54 "With this nifty option, vim will search for text as you enter it.
set incsearch 55 55 set incsearch
"highlight search results 56 56 "highlight search results
set hlsearch 57 57 set hlsearch
58 58
"ignore search case with all lowercase, use case when all uppercase 59 59 "ignore search case with all lowercase, use case when all uppercase
set ignorecase 60 60 set ignorecase
set smartcase 61 61 set smartcase
62 62
"syntax stuff 63 63 "syntax stuff
syntax on 64 64 syntax on
syntax sync fromstart "increases syntax accuracy 65 65 syntax sync fromstart "increases syntax accuracy
66 66
"STFU 67 67 "STFU
set noerrorbells 68 68 set noerrorbells
set vb t_vb="" 69 69 set vb t_vb=""
70 70
" use mouse everywhere 71 71 " use mouse everywhere
set mouse=a 72 72 set mouse=a
73 73
" turn on command line completion wild style 74 74 " turn on command line completion wild style
set wildmenu 75 75 set wildmenu
76 76
"ignore these list file extensions 77 77 "ignore these list file extensions
set wildignore=*.dll,*.o,*.obj,*.exe,*.pyc,*.jpg,*.gif,*.png,*.class,*.ln 78 78 set wildignore=*.dll,*.o,*.obj,*.exe,*.pyc,*.jpg,*.gif,*.png,*.class,*.ln
set wildmode=list:longest " turn on wild mode huge list 79 79 set wildmode=list:longest " turn on wild mode huge list
80 80
"Keep the cursor n lines from the top and bottom 81 81 "Keep the cursor n lines from the top and bottom
set scrolloff=2 82 82 set scrolloff=2
set sidescrolloff=4 " Keep n lines at the side 83 83 set sidescrolloff=4 " Keep n lines at the side
84 84
" always show the status line 85 85 " always show the status line
set laststatus=2 86 86 set laststatus=2
87 87
" we do what to show tabs, to ensure we get them out of my files 88 88 " we do what to show tabs, to ensure we get them out of my files
set list 89 89 set list
" show tabs and trailing 90 90 " show tabs and trailing
set listchars=tab:>-,trail:- 91 91 set listchars=tab:>-,trail:-
92 92
"show line numbers 93 93 "show line numbers
set number 94 94 set number
95 95
" Show number of lines changed by : commands 96 96 " Show number of lines changed by : commands
set report=0 97 97 set report=0
98 98
" show the command being typed 99 99 " show the command being typed
set showcmd 100 100 set showcmd
101 101
" do not wrap line 102 102 " do not wrap line
set nowrap 103 103 set nowrap
"if we do ever decide to wrap display a nice wrap image 104 104 "if we do ever decide to wrap display a nice wrap image
set showbreak=↪ 105 105 set showbreak=↪
106 106
"statusline 107 107 "statusline
"replaced by vim-powerline plugin 108 108 "replaced by vim-powerline plugin
"set statusline=%F%m%r%h%w\ [%Y,%{&ff}]\ [%l/%L,%c][%p%%] 109 109 "set statusline=%F%m%r%h%w\ [%Y,%{&ff}]\ [%l/%L,%c][%p%%]
110 110
"Highlight current line 111 111 "Highlight current line
set cursorline 112 112 set cursorline
113 113
" make backspace always work 114 114 " make backspace always work
set backspace=indent,eol,start 115 115 set backspace=indent,eol,start
116 116
" toggle paste mode 117 117 " toggle paste mode
set pastetoggle=<F2> 118 118 set pastetoggle=<F2>
119 119
" toggle spellcheck 120 120 " toggle spellcheck
map <F7> :setlocal spell! spelllang=en_us<CR> 121 121 map <F7> :setlocal spell! spelllang=en_us<CR>
122 122
" ########################################## 123 123 " ##########################################
" Plugin Code 124 124 " Plugin Code
" ########################################## 125 125 " ##########################################
"start pathogen to load all plugins 126 126 "start pathogen to load all plugins
runtime bundle/vim-pathogen/autoload/pathogen.vim 127 127 runtime bundle/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect() 128 128 execute pathogen#infect()
129 129
130 130
" key used to launch nerdtree 131 131 " key used to launch nerdtree