diff --git a/.vim/keymaps.vim b/.vim/keymaps.vim new file mode 100644 index 0000000..aba6f92 --- /dev/null +++ b/.vim/keymaps.vim @@ -0,0 +1,13 @@ +let mapleader = ',' + +" core +nnoremap :bnext +nnoremap :bprevious +nnoremap :nohlsearch +nnoremap Q + +" vim-argwrap +nnoremap a :call argwrap#toggle() + +" vim-easy-align +vmap (EasyAlign) diff --git a/.vim/options.vim b/.vim/options.vim new file mode 100644 index 0000000..6ed7548 --- /dev/null +++ b/.vim/options.vim @@ -0,0 +1,54 @@ +filetype indent plugin on +colorscheme wombat256 +syntax enable + +set nocompatible + +set autochdir +set autoread +set autowrite +set backspace=indent,eol,start +set encoding=utf-8 +set expandtab +set fileformats=unix,dos,mac +set formatoptions-=c +set formatoptions-=o +set formatoptions-=r +set hidden +set hlsearch +set ignorecase +set incsearch +set laststatus=2 +set linebreak +set mouse=nvi +set mousemodel=popup +set nobackup +set nofoldenable +set noswapfile +set nowrap +set number +set path=$VIMPATH +set scrolloff=5 +set shiftwidth=4 +set shortmess+=I +set smartcase +set smarttab +set tabstop=4 +set wildmenu +set wrapmargin=1 + +if has('gui_running') + set columns=150 + set cursorline + set guioptions-=L + set guioptions-=R + set guioptions-=T + set guioptions-=l + set guioptions-=m + set guioptions-=r + set lines=50 +endif + +if $SHELL =~ 'bin/fish' + set shell=/bin/sh +endif diff --git a/.vim/plugins.vim b/.vim/plugins.vim index a5f801a..1fac53a 100644 --- a/.vim/plugins.vim +++ b/.vim/plugins.vim @@ -1,29 +1,45 @@ call plug#begin('~/.vim/plugged') -Plug 'https://github.com/Lokaltog/vim-easymotion.git' -Plug 'https://github.com/bling/vim-airline.git' Plug 'git://git.code.sf.net/p/vim-latex/vim-latex' +Plug 'https://github.com/FooSoft/vim-argwrap.git' +Plug 'https://github.com/Lokaltog/vim-easymotion.git' +Plug 'https://github.com/antoyo/vim-licenses.git' +Plug 'https://github.com/bkad/CamelCaseMotion' +Plug 'https://github.com/bling/vim-airline.git' +Plug 'https://github.com/dhruvasagar/vim-table-mode.git' +Plug 'https://github.com/flazz/vim-colorschemes.git' Plug 'https://github.com/junegunn/vim-easy-align.git' -Plug 'https://github.com/tpope/vim-surround' +Plug 'https://github.com/kien/ctrlp.vim.git' +Plug 'https://github.com/mattn/emmet-vim.git' +Plug 'https://github.com/michaeljsmith/vim-indent-object.git' +Plug 'https://github.com/nathanaelkane/vim-indent-guides.git' +Plug 'https://github.com/ntpeters/vim-better-whitespace.git' +Plug 'https://github.com/pangloss/vim-javascript.git' +Plug 'https://github.com/plasticboy/vim-markdown.git' +Plug 'https://github.com/scrooloose/syntastic.git' +Plug 'https://github.com/tpope/vim-abolish.git' +Plug 'https://github.com/tpope/vim-commentary.git' +Plug 'https://github.com/tpope/vim-eunuch.git' Plug 'https://github.com/tpope/vim-fugitive.git' Plug 'https://github.com/tpope/vim-pathogen.git' -Plug 'https://github.com/tpope/vim-commentary.git' Plug 'https://github.com/tpope/vim-repeat' -Plug 'https://github.com/pangloss/vim-javascript.git' -Plug 'https://github.com/tpope/vim-abolish.git' -Plug 'https://github.com/flazz/vim-colorschemes.git' +Plug 'https://github.com/tpope/vim-surround' Plug 'https://github.com/tpope/vim-unimpaired.git' -Plug 'https://github.com/kien/ctrlp.vim.git' -Plug 'https://github.com/ntpeters/vim-better-whitespace.git' -Plug 'https://github.com/tpope/vim-eunuch.git' -Plug 'https://github.com/mattn/emmet-vim.git' -Plug 'https://github.com/nathanaelkane/vim-indent-guides.git' -Plug 'https://github.com/scrooloose/syntastic.git' -Plug 'https://github.com/dhruvasagar/vim-table-mode.git' -Plug 'https://github.com/antoyo/vim-licenses.git' -Plug 'https://github.com/FooSoft/vim-argwrap.git' -Plug 'https://github.com/plasticboy/vim-markdown.git' -Plug 'https://github.com/bkad/CamelCaseMotion' -Plug 'https://github.com/michaeljsmith/vim-indent-object.git' call plug#end() + +" syntastic +let g:syntastic_python_checkers = ['pyflakes'] + +" vim-argwrap +let g:argwrap_padded_braces = '{' + +" vim-latex +let g:Tex_DefaultTargetFormat = 'pdf' +let g:Tex_MultipleCompileFormats = 'pdf, aux' + +" vim-licenses +let g:licenses_authors_name = 'Alex Yatskov ' + +" vim-table-mode +let g:table_mode_corner = '|' diff --git a/.vimrc b/.vimrc index 17c11f8..a860aeb 100644 --- a/.vimrc +++ b/.vimrc @@ -1,87 +1,5 @@ set runtimepath+=~/.vim runtime plugins.vim - -" vim-latex -let g:Tex_DefaultTargetFormat='pdf' -let g:Tex_MultipleCompileFormats='pdf, aux' - -" vim-licenses -let g:licenses_authors_name='Alex Yatskov ' - -" vim-table-mode -let g:table_mode_corner='|' -let g:syntastic_python_checkers=['pyflakes'] -let g:mapleader=',' - -" vim-argwrap -let g:argwrap_padded_braces='{' - -colorscheme wombat256 -filetype indent plugin on -syntax enable - -augroup general - autocmd! - autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o - autocmd BufRead,BufNewFile *.md set filetype=markdown -augroup END - -set autochdir -set autoread -set autowrite -set backspace=indent,eol,start -set encoding=utf-8 -set expandtab -set fileformats=unix,dos,mac -set hidden -set hlsearch -set ignorecase -set incsearch -set laststatus=2 -set linebreak -set mouse=nvi -set mousemodel=popup -set nobackup -set nocompatible -set nofoldenable -set noswapfile -set nowrap -set number -set path=$VIMPATH -set scrolloff=5 -set shiftwidth=4 -set shortmess+=I -set smartcase -set smarttab -set tabstop=4 -set wildmenu -set wrapmargin=1 - -if has('gui_running') - set columns=150 - set cursorline - set guioptions-=L - set guioptions-=R - set guioptions-=T - set guioptions-=l - set guioptions-=m - set guioptions-=r - set lines=50 -endif - -if $SHELL=~'bin/fish' - set shell=/bin/sh -endif - -nnoremap :bnext -nnoremap :bprevious -nnoremap :nohlsearch -nnoremap Q - -" vim-easy-align -vmap (EasyAlign) -nmap a (EasyAlign) - -" vim-arg-wrap -nnoremap a :call argwrap#toggle() +runtime options.vim +runtime keymaps.vim