dotfiles/.vimrc

165 lines
3.7 KiB
VimL
Raw Permalink Normal View History

2016-02-25 16:52:09 +00:00
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
2020-10-09 03:36:36 +00:00
set rtp+=~/.config/nvim/bundle/Vundle.vim
2020-11-07 15:48:34 +00:00
call plug#begin('~/.config/nvim/plug')
Plug 'chriskempson/base16-vim'
Plug 'godlygeek/tabular'
Plug 'plasticboy/vim-markdown'
Plug 'itchyny/lightline.vim'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/nerdcommenter'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'othree/html5.vim'
Plug 'tpope/vim-haml'
Plug 'junegunn/fzf'
call plug#end()
2015-11-17 23:59:57 +00:00
2016-02-25 16:52:09 +00:00
syntax enable
2015-11-17 23:59:57 +00:00
set background=dark
2020-10-09 03:36:36 +00:00
set termguicolors
colorscheme base16-default-dark
2015-11-17 23:59:57 +00:00
hi Search cterm=NONE ctermfg=white ctermbg=red
2017-04-29 18:15:10 +00:00
hi clear SpecialKey
2020-10-09 03:36:36 +00:00
filetype plugin indent on
2015-12-02 13:58:40 +00:00
2015-11-17 23:59:57 +00:00
"Disable vi-compatible backspace behavior
set backspace=indent,eol,start
"Default character encoding
set encoding=utf-8
set fileencoding=utf-8
" All unix, all the time
set ffs=unix
set ff=unix
" Indentation stuff
set tabstop=2
set softtabstop=2
set shiftwidth=2
2016-06-22 17:58:30 +00:00
set noexpandtab
2017-07-04 14:19:07 +00:00
set textwidth=0
set colorcolumn=81
2016-06-22 17:58:30 +00:00
2015-11-17 23:59:57 +00:00
set autoindent
2016-06-22 17:58:30 +00:00
set smartindent
2015-11-17 23:59:57 +00:00
" Look and feel
set encoding=utf-8
2015-12-02 13:58:40 +00:00
set noshowmode
2015-11-17 23:59:57 +00:00
set number
set wildmenu
set showmatch
" Silence is golden
set noerrorbells
set novisualbell
" Searching things
set incsearch
set hlsearch
set ignorecase
set smartcase
2018-07-09 15:04:58 +00:00
autocmd BufNewFile,BufRead *.sls set filetype=yaml
2015-11-17 23:59:57 +00:00
" Visually display whitespace (this prevents slowness from match command)
set list
2017-04-29 18:15:10 +00:00
set listchars=tab:··,trail:-,nbsp:+
2015-11-17 23:59:57 +00:00
"Display each keystroke in the status line
set showcmd
"Always show the status line
set laststatus=2
set hidden
" Remapping things
let mapleader=","
let maplocalleader=","
2015-11-17 23:59:57 +00:00
" Making my life hard on purpose so it is easier later...
nnoremap <buffer><Left> <nop>
nnoremap <buffer><Right> <nop>
nnoremap <buffer><Up> <nop>
nnoremap <buffer><Down> <nop>
nnoremap <buffer><PageUp> <nop>
nnoremap <buffer><PageDown> <nop>
nnoremap <buffer><Home> <nop>
nnoremap <buffer><Insert> <nop>
nnoremap <buffer><End> <nop>
vnoremap <buffer><Left> <nop>
vnoremap <buffer><Right> <nop>
vnoremap <buffer><Up> <nop>
vnoremap <buffer><Down> <nop>
vnoremap <buffer><PageUp> <nop>
vnoremap <buffer><PageDown> <nop>
vnoremap <buffer><Home> <nop>
vnoremap <buffer><Insert> <nop>
vnoremap <buffer><End> <nop>
inoremap <buffer><Left> <nop>
inoremap <buffer><Right> <nop>
inoremap <buffer><Up> <nop>
inoremap <buffer><Down> <nop>
inoremap <buffer><PageUp> <nop>
inoremap <buffer><PageDown> <nop>
inoremap <buffer><Home> <nop>
inoremap <buffer><Insert> <nop>
inoremap <buffer><End> <nop>
2017-08-24 23:29:04 +00:00
nnoremap ; :
2020-10-09 03:36:36 +00:00
nnoremap <Leader>b :buffers<CR>:buffer<Space>
2015-11-17 23:59:57 +00:00
"Toggle line numbering
nmap <Leader>n :setlocal number!<CR>
2015-12-02 13:58:40 +00:00
nmap <Leader>c :nohlsearch<CR>
2017-07-04 14:19:07 +00:00
set pastetoggle=<leader>p
2015-11-17 23:59:57 +00:00
map <C-J> :bnext<CR>
map <C-K> :bprev<CR>
map <C-L> :tabn<CR>
map <C-H> :tabp<CR>
2020-10-09 03:36:36 +00:00
map <C-O> :NERDTreeToggle<CR>
2015-11-17 23:59:57 +00:00
"Delete single characters without updating the default register
noremap x "_x
"Paste in visual mode without updating the default register
vnoremap p "_dP
"Jump five lines when scrolling at edge of screen
set scrolljump=1
"Cause screen to scroll when within three lines of the edge
set scrolloff=5
set sidescrolloff=5
"Folding
set foldmethod=indent
set nofoldenable
2017-04-29 18:15:10 +00:00
set grepprg=grep\ -nH\ $*
2015-11-17 23:59:57 +00:00
2017-12-22 21:44:06 +00:00
let g:powerline_pycmd = "py3"
2015-11-17 23:59:57 +00:00
let loaded_matchparen = 1
let g:vimtex_view_general_viewer = 'qpdfview'
let g:vimtex_compiler_latexmk = {'callback' : 0}
let g:vimtex_view_general_options
\ = '--unique @pdf\#src:@tex:@line:@col'
let g:vimtex_view_general_options_latexmk = '--unique'
let g:tex_flavor = 'latex'
let g:vimtex_compiler_latexmk = {
\ 'background' : 1,
\ 'build_dir' : '',
\ 'callback' : 0,
\ 'continuous' : 0,
\ 'executable' : 'latexmk',
\ 'options' : [
\ '-pdf',
\ '-verbose',
\ '-file-line-error',
\ '-synctex=1',
\ '-interaction=nonstopmode',
\ ],
\}