Cleaned up my vimrc a bunch. Added better wrapping. Added ack.vim. Fixed regex. Lot's of changes

master
Dustin Swan 13 years ago
parent f82a218710
commit cd53262cfc

90
vimrc

@ -17,6 +17,7 @@ Bundle 'tpope/vim-repeat'
Bundle 'tpope/vim-surround' Bundle 'tpope/vim-surround'
Bundle 'tpope/vim-fugitive' Bundle 'tpope/vim-fugitive'
Bundle 'tpope/vim-endwise' Bundle 'tpope/vim-endwise'
Bundle 'mileszs/ack.vim'
Bundle 'Lokaltog/vim-powerline' Bundle 'Lokaltog/vim-powerline'
Bundle 'Lokaltog/vim-easymotion' Bundle 'Lokaltog/vim-easymotion'
Bundle 'bkad/CamelCaseMotion' Bundle 'bkad/CamelCaseMotion'
@ -40,24 +41,35 @@ Bundle 'garbas/vim-snipmate'
filetype plugin indent on " last Vundle requirement filetype plugin indent on " last Vundle requirement
" general goodness
syntax enable syntax enable
set hidden " allow hidden buffers let mapleader=","
set hidden " allow hidden unsaved buffers
set history=1000 " longer history set history=1000 " longer history
set noswapfile " turn off swapfiles set noswapfile " turn off swapfiles
set nu " line numbers set number " line numbers
set sc " show the command as it is typed "set relativenumber " TODO make a command to toggle this. <leader>n maybe..
set showcmd " show the command as it is typed
set showmode
set wildmenu set wildmenu
set wildmode=longest:full set backspace=indent,eol,start
let mapleader = "," set ttyfast
"set wildmode=longest:full
set wildmode=list:longest " try this on for a while
set autoread " when a file is changed externally set autoread " when a file is changed externally
set mat=2
set ruler set ruler
set cursorline " Highlight current line set cursorline " Highlight current line
set encoding=utf-8 " Necessary to show unicode glyphs set encoding=utf-8 " Necessary to show unicode glyphs
set laststatus=2 " Always show the statusline set laststatus=2 " Always show the statusline
set scrolloff=5 " Give us a few lines before and after the cursor
" Powerline " long lines
let g:Powerline_symbols='fancy' set wrap
set formatoptions=rqn1
set textwidth=80
if version > 702
set colorcolumn=80
endif
" persistent undo " persistent undo
if v:version > 703 if v:version > 703
@ -66,17 +78,24 @@ if v:version > 703
endif endif
" indentation " indentation
filetype plugin on
filetype indent on
set autoindent set autoindent
set smartindent set smartindent
" search " search
set hlsearch set hlsearch
set incsearch set incsearch
set smartcase set ignorecase
set gdefault " now substitutions assume /g
set smartcase " if we include uppercase, it will be case sensitive
set showmatch " matching brackets set showmatch " matching brackets
set matchtime=2 " blink brackets set matchtime=2 " blink brackets
" turn off highlighting
nnoremap <leader><space> :noh<cr>
" regex " thanks stevelosh
set magic
nnoremap / /\v
vnoremap / /\v
" tab stops " tab stops
set tabstop=4 set tabstop=4
@ -85,10 +104,25 @@ set shiftwidth=4
set expandtab set expandtab
set smarttab set smarttab
" pretty line endings and trailing spaces
set list
set listchars=tab:»·,trail,eol
" so we get html goodies in php files " so we get html goodies in php files
au BufRead *.php set ft=php.html au BufRead *.php set ft=php.html
au BufNewFile *.php set ft=php.html au BufNewFile *.php set ft=php.html
set thesaurus+=~/.wordlists/mthesaur.txt
set dictionary+=/usr/share/dict/words
" hide toolbar in macvim, etc
if has("gui_running")
set go=-t
endif
" Powerline
let g:Powerline_symbols='fancy'
" Solarized " Solarized
set background=dark set background=dark
let g:solarized_termtrans=1 let g:solarized_termtrans=1
@ -100,16 +134,15 @@ let g:solarized_hitrail=1 "default value is 0
colorscheme solarized colorscheme solarized
" NERDTree " NERDTree
"nnoremap <silent> <leader>n :NERDTreeToggle <CR> "nnoremap <silent> <leader>n :NERDTreeToggle <cr>
"let NERDTreeMinimalUI=1 "let NERDTreeMinimalUI=1
"let NERDTreeDirArrows=1 "let NERDTreeDirArrows=1
" Tagbar " Tagbar
nnoremap <silent> <leader>t :TagbarToggle <CR> nnoremap <silent> <leader>t :TagbarToggle <cr>
" disable tagbar in old Vim
" hide toolbar in macvim, etc if v:version < 703
if has("gui_running") let g:loaded_tagbar=1
set go=-t
endif endif
" Syntastic " Syntastic
@ -123,21 +156,14 @@ endif
" Supertab " Supertab
" let g:SuperTabDefaultCompletionType="context" " let g:SuperTabDefaultCompletionType="context"
" Highlight column 80 " CtrlP
if version > 702 nnoremap <leader>b :CtrlPBuffer<cr>
set colorcolumn=80
endif
" pretty line endings and trailing spaces
set list listchars=tab:»·,trail,eol:↪
" turn off highlighting
" nnoremap <Esc> :noh<CR><Esc>
" open the current file for edit in Perforce " open the current file for edit in Perforce
nnoremap <leader>p :! p4 edit %<CR> nnoremap <leader>4 :! p4 edit %<cr>
" disable tagbar in old Vim " open vsplit and switch to it
if v:version < 703 nnoremap <leader>w <c-w>v<c-w>l
let g:loaded_tagbar=1
endif " open Ack
nnoremap <leader>a :Ack

Loading…
Cancel
Save