all repos — dotfiles @ 1cf967a74be325145887e4c2b59094e1496f41e2

my *nix dotfiles

config/nvim/init.vim (view raw)

  1" _       _ _         _           
  2"(_)_ __ (_) |___   _(_)_ __ ___  
  3"| | '_ \| | __\ \ / / | '_ ` _ \ 
  4"| | | | | | |_ \ V /| | | | | | |
  5"|_|_| |_|_|\__(_)_/ |_|_| |_| |_|
  6"
  7
  8
  9call plug#begin()
 10Plug 'jiangmiao/auto-pairs'
 11Plug 'airblade/vim-gitgutter'
 12Plug 'git@fern:vim/vim-colors-plain'
 13Plug 'dbeniamine/vim-mail', { 'for': ['mail'] }
 14Plug 'tpope/vim-surround'
 15" plugins for writing {{{
 16Plug 'reedes/vim-pencil', { 'for': ['text',  'markdown'] }
 17Plug 'plasticboy/vim-markdown', { 'for': ['text',  'markdown'] }
 18" }}}
 19Plug 'ervandew/supertab'
 20Plug 'wellle/targets.vim'
 21Plug 'tpope/vim-rsi'
 22Plug 'zah/nim.vim', { 'for': ['nim'] }
 23call plug#end()
 24
 25augroup restorecursor
 26	autocmd BufReadPost *
 27				\ if line("'\"") > 1 && line("'\"") <= line("$") |
 28				\   execute "normal! g`\"" |
 29				\ endif
 30augroup END
 31
 32" basic settings
 33set swapfile
 34set dir=/tmp
 35set nonumber
 36set smartcase
 37syntax on
 38filetype plugin indent on
 39set laststatus=2
 40set hlsearch
 41set incsearch
 42set ignorecase
 43set scrolloff=12
 44set rtp+=~/.fzf
 45set timeout timeoutlen=3000 ttimeoutlen=100
 46set undodir=~/.vim/undodir
 47set nowrap
 48set nocursorline
 49set nofoldenable
 50set conceallevel=2 
 51set mouse=a
 52set wildmenu
 53set shiftwidth=4     " indent = 4 spaces
 54set tabstop=4        " tab = 4 spaces
 55set expandtab
 56set softtabstop=4    " backspace through spaces
 57set nocompatible
 58set noshowmode
 59set clipboard=unnamedplus
 60
 61" wildcard ignores
 62set wildignore+=.git,.hg,.svn
 63set wildignore+=*.aux,*.out,*.toc
 64set wildignore+=*.o,*.obj,*.exe,*.dll,*.manifest,*.rbc,*.class
 65set wildignore+=*.ai,*.bmp,*.gif,*.ico,*.jpg,*.jpeg,*.png,*.psd,*.webp
 66set wildignore+=*.avi,*.divx,*.mp4,*.webm,*.mov,*.m2ts,*.mkv,*.vob,*.mpg,*.mpeg
 67set wildignore+=*.mp3,*.oga,*.ogg,*.wav,*.flac
 68set wildignore+=*.eot,*.otf,*.ttf,*.woff
 69set wildignore+=*.doc,*.pdf,*.cbr,*.cbz
 70set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz,*.kgb
 71set wildignore+=*.swp,.lock,.DS_Store,._*
 72
 73" colorscheme
 74colorscheme plain
 75set background=dark
 76
 77" git gutter settings
 78let g:gitgutter_override_sign_column_highlight = 0
 79let g:gitgutter_sign_added                     = '+'
 80let g:gitgutter_sign_modified                  = '±'
 81let g:gitgutter_sign_removed                   = '-'
 82let g:gitgutter_sign_removed_first_line        = '^'
 83let g:gitgutter_sign_modified_removed          = '#'
 84
 85" comments are italicized
 86hi Comment cterm=italic
 87" color overrides
 88hi CursorLine ctermbg=none
 89
 90" vim-pencil
 91let g:pencil#textwidth = 72
 92let g:pencil#conceallevel = 0
 93
 94augroup setMail
 95    autocmd!
 96    autocmd BufRead,BufNewFile /tmp/nail-* setlocal ft=mail
 97augroup END
 98
 99" insert date
100abclear
101cabbrev dt read !~/bin/date.sh<cr>
102cabbrev tm read !date "+\%H:\%M"
103
104" change cursor
105" doesn't actually work :(
106if exists('$TMUX')
107    let &t_SI .= "\ePtmux;\e\e[6 q\e\\"
108    let &t_EI .= "\ePtmux;\e\e[2 q\e\\"
109    let &t_SR .= "\ePtmux;\e\e[4 q\e\\"
110else
111    let &t_SI .= "\e[6 q"
112    let &t_EI .= "\e[2 q"
113    let &t_SR .= "\e[4 q"
114endif