sync/vimrc

229 lines
6.6 KiB
VimL
Raw Normal View History

2014-04-19 13:25:29 -04:00
let g:neosnippet#snippets_directory='~/.vim/bundle/snipmate-snippets/snippets'
if has('conceal')
set conceallevel=2 concealcursor=i
endif
nnoremap <Leader>autoformat! :%s/, /,<CR>:%s/ \/ /\/<CR>:%s/ {/{<CR>:%s/} /}<CR>:%s/ = /=
command! W %!sudo tee > /dev/null %
au BufWritePost .vimrc so ~/.vimrc
au VimResized * exe "normal! \<c-w>="
"match Error /\s\+$/
2014-04-19 13:25:29 -04:00
"nnoremap s xa
"nnoremap <F5> :UndotreeToggle<CR>
2014-06-16 09:42:03 -04:00
inoremap <expr><Tab> pumvisible() ? "\<C-n>" : "\<TAB>"
imap <Expr>\ neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : pumvisible() ? "\<C-n>" : "\<TAB>"
smap <Expr>\ neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
2014-05-19 12:30:34 -04:00
nnoremap <F3> :!make&&echo "Uploading robot code";wput ./PPC603gnu/src/Debug/src.out ftp://frc:frc@10.20.59.2/ni-rt/system/FRC_UserProgram.out<CR>
2014-04-19 13:25:29 -04:00
nnoremap G G$
vnoremap G G$
nnoremap <F6> :GundoToggle<CR>
nnoremap <F8> :TagbarToggle<CR>
nnoremap + <C-a>
nnoremap - <C-x>
nnoremap Q <Nop>
noremap <Leader><Leader> <C-^>
nnoremap <Leader>a :!git st<CR>:!ls<CR>:!git a
nnoremap <Leader>up :!git pull origin
nnoremap <Leader>st :!git st<CR>
nnoremap <Leader>ci :!git st<CR>:!git ci ""<Left>
nnoremap <Leader>log :!git hist<CR>
nnoremap <Leader>br :!git br<CR>
nnoremap gb :ls<CR>:b
nnoremap <Leader>d :bd
nnoremap <Leader>q :q
nnoremap <Leader>W :%s/\s\+$//<CR>:let @/=''<CR>
nnoremap <Leader>o m`o<Esc>``
nnoremap <Leader>O m`O<Esc>``
nnoremap <Leader>go %m`%x``
nnoremap <Leader>if m"Oif(){<Esc>jo}<Esc>`"v><Esc>k^wa
nnoremap <Leader>else m"kAelse{<Esc>jo}<Esc>`"v><Esc>
nnoremap <Leader>for m"Ofor(){<Esc>jo}<Esc>`"v><Esc>k^wa
nnoremap <Leader>while m"Owhile(){<Esc>jo}<Esc>`"v><Esc>k^wa
nnoremap <Leader>rm m"kddjddkv<<Esc>`"
nnoremap <Leader>{ O//{{{<Esc>jo//}}}<Esc>kk^la
vnoremap <Leader>{ <Esc>`<O//{{{<Esc>`>o//}}}<Esc>`<k^la
vnoremap <Leader>if <Esc>`<Oif(){<Esc>`>o}<Esc>gv><Esc>`<k^wa
vnoremap <Leader>else <Esc>`<kAelse{<Esc>`>o}<Esc>gv><Esc>
vnoremap <Leader>for <Esc>`<Ofor(){<Esc>`>o}<Esc>gv><Esc>`<k^wa
vnoremap <Leader>while <Esc>`<Owhile(){<Esc>`>o}<Esc>gv><Esc>`<k^wa
vnoremap <Leader>rm <Esc>`<<Esc>kdd`>jddgv<<Esc>
2014-06-16 09:42:03 -04:00
vnoremap <silent> * :call VisualSelection('f')<CR>
vnoremap <silent> # :call VisualSelection('b')<CR>
2014-04-19 13:25:29 -04:00
"nnoremap <Space> zo:set hlsearch! hlsearch?<CR>
2014-06-16 09:42:03 -04:00
"nnoremap <Space> :nohlsearch<CR>g<C-g>zo
nnoremap <BS> :nohlsearch<CR>g<C-g>zo
2014-04-19 13:25:29 -04:00
nnoremap U <C-r>
nnoremap K i<CR><Esc>k$
2014-06-16 09:42:03 -04:00
nnoremap <Enter> :w<CR>g<C-g>
2014-04-19 13:25:29 -04:00
"nnoremap s c
vnoremap gj j
vnoremap gk k
2014-05-13 17:30:33 -04:00
vnoremap j gj
vnoremap k gk
vnoremap H ^
vnoremap L $
nnoremap gj j
nnoremap gk k
2014-04-19 13:25:29 -04:00
nnoremap j gj
nnoremap k gk
nnoremap H ^
nnoremap L $
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
map , <Plug>(easymotion-prefix)
noremap ! :!
nnoremap ; :
noremap J Jx
nnoremap ;; m"A;<Esc>`"
vnoremap < <gv
vnoremap > >gv
inoremap <F1> <nop>
vnoremap <F1> <nop>
2014-05-30 12:45:50 -04:00
noremap <Leader><Tab> :ls<CR>:b
2014-04-19 13:25:29 -04:00
nnoremap <leader>== yyPv$r=jyypv$r=
nnoremap <leader>** yyPv$r*jyypv$r*
nnoremap <leader>= yypv$r=
nnoremap <leader>- yypv$r-
nnoremap <leader>^ yypv$r^
nnoremap <leader>" yypv$r"
2014-06-16 09:42:03 -04:00
inoremap '' ''<Left>
inoremap "" ""<Left>
inoremap () ()<Left>
inoremap <> <><Left>
inoremap {} <Right>{}<Left><CR><Esc>O
2014-06-17 00:02:07 -04:00
inoremap {% {% %}<Left><Left><Left>
2014-06-16 09:42:03 -04:00
inoremap [] []<Left>
inoremap ;; <Esc>m`A;<Esc>``a
inoremap <C-l> <Right>
inoremap <C-h> <Left>
inoremap <C-k> <Up>
inoremap <C-j> <Down>
nnoremap Y y$
set guicursor+=n-v-c:blinkon0
set formatoptions-=r
set formatoptions-=o
2014-04-19 13:25:29 -04:00
set diffopt+=iwhite
set noesckeys
set mouse-=a
set expandtab
set shiftwidth=2
set history=1000
set hidden
set cursorline
set incsearch
set showmatch
set hlsearch
set scrolloff=3
set scrolljump=5
set autoindent
set backup
set backupdir=~/.vim/backup
set directory=~/.vim/tmp
set undolevels=1000
set history=200
set ttyfast
set ff=unix
syntax on
let g:formatprg_cpp = "astyle"
let g:formatprg_args_expr_cpp = " --mode=c --style=1tbs -xe -k1 -j"
2014-06-16 09:42:03 -04:00
" These flags don't work for some reason
2014-04-19 13:25:29 -04:00
" -xn -xc -xl -S
let g:airline#extensions#tabline#enabled=1
let g:Powerline_symbols = 'fancy'
set encoding=utf-8
set laststatus=2
set foldmethod=marker
set foldnestmax=10
set foldlevel=2
set rnu
set nu
set ts=2 sw=2 et
let g:indent_guides_start_level=2
let g:indent_guides_guide_size=1
let g:indent_guides_enable_on_vim_startup=1
set background=dark
set t_Co=256
set gdefault
let g:neocomplcache_enable_at_startup=1
let g:neocomplcache_enable_camel_case_completion=1
let g:neocomplcache_enable_smart_case=1
let g:neocomplcache_enable_underbar_completion=1
let g:neocomplcache_enable_auto_delimiter=1
let g:neocomplcache_max_list=20
let g:neocomplcache_force_overwrite_completefunc=1
let g:neocomplcache_min_syntax_length = 2
let g:php_refactor_command='php /usr/local/bin/refactor.phar'
"inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>"
2014-04-19 13:25:29 -04:00
"let g:neocomplcache_enable_auto_select = 1
let loaded_matchit = 1
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
2014-06-16 09:42:03 -04:00
"Bundle 'Floobits/floobits-vim'
2014-04-19 13:25:29 -04:00
Bundle 'Chiel92/vim-autoformat'
Bundle 'tpope/vim-surround'
Bundle 'scrooloose/syntastic'
Bundle 'Shougo/neocomplcache.vim'
Bundle 'nathanaelkane/vim-indent-guides'
Bundle 'elzr/vim-json'
Bundle 'groenewege/vim-less'
Bundle 'pangloss/vim-javascript'
Bundle 'briancollins/vim-jst'
Bundle 'kchmck/vim-coffee-script'
Bundle 'Lokaltog/powerline-fonts'
Bundle 'bling/vim-airline'
Bundle 'terryma/vim-multiple-cursors'
Bundle 'scrooloose/nerdtree'
Bundle 'altercation/vim-colors-solarized'
Bundle 'spf13/vim-colors'
Bundle 'spf13/PIV'
Bundle 'vim-scripts/AutoTag'
Bundle 'Lokaltog/vim-easymotion'
"Bundle 'tsaleh/vim-matchit'
Bundle 'mbbill/undotree'
Bundle 'vim-php/vim-php-refactoring'
Bundle 'tpope/vim-fugitive'
Bundle 'kien/ctrlp.vim'
Bundle 'vim-scripts/YankRing.vim'
Bundle 'majutsushi/tagbar'
Bundle 'sjl/gundo.vim'
2014-04-23 20:42:35 -04:00
Bundle 'tommcdo/vim-exchange'
Bundle 'tpope/vim-repeat'
Bundle 'tpope/vim-commentary'
2014-04-19 13:25:29 -04:00
"Bundle 'Shougo/neosnippet'
"Bundle 'honza/vim-snippets'
"Bundle 'msanders/snipmate.vim'
filetype plugin indent on
if exists("+undofile")
if isdirectory($HOME . '/.vim/undo') == 0
:silent !mkdir -p ~/.vim/undo > /dev/null 2>&1
endif
set undodir=./.vim-undo//
set undodir+=~/.vim/undo//
set undofile
endif
augroup vimrcEx
au!
" When editing a file, always jump to the last known cursor position.
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
augroup END
if has('gui_running')
set guioptions-=T
set lines=40
colorscheme fruity
else
if &term == 'xterm' || &term == 'screen'
set t_Co=256
endif
colorscheme torte
endif
2014-05-02 20:06:07 -04:00
nnoremap <Leader>W :%s/\s\+$//<cr>:let @/=''<cr>
nnoremap <Leader>H *<C-O>:AckFromSearch!<CR>