2015-03-20 17:16:03 +00:00
|
|
|
" set the directory where my vimrc git project is located
|
2018-03-23 12:47:18 +00:00
|
|
|
source ~/.config/nvim/local.vim
|
2015-03-20 17:16:03 +00:00
|
|
|
|
2015-10-14 02:48:33 +00:00
|
|
|
" it is a big fat key, after all
|
2015-10-14 02:49:55 +00:00
|
|
|
" N.B. should come before plugins and plugin specific settings
|
2015-10-14 02:48:33 +00:00
|
|
|
let mapleader = "\<Space>"
|
2015-10-13 18:58:49 +00:00
|
|
|
|
2015-03-20 17:16:03 +00:00
|
|
|
" source aux files also under git control
|
|
|
|
let oldwd = getcwd()
|
|
|
|
exec "cd " . vimrc_git
|
2017-10-19 15:42:06 +00:00
|
|
|
source plug.vim
|
2019-05-16 15:47:38 +00:00
|
|
|
source ncm2.vim
|
2015-10-14 02:48:33 +00:00
|
|
|
source airline.vim
|
|
|
|
source syntastic.vim
|
2017-10-19 15:42:06 +00:00
|
|
|
source fzf.vim
|
2015-10-14 02:48:33 +00:00
|
|
|
source mapping.vim
|
2017-06-21 19:48:29 +00:00
|
|
|
source jsonnet.vim
|
2017-09-09 17:02:44 +00:00
|
|
|
source racer.vim
|
2018-01-04 17:58:23 +00:00
|
|
|
source lsp.vim
|
2018-01-16 19:21:05 +00:00
|
|
|
source autoformat.vim
|
2020-05-11 15:38:35 +00:00
|
|
|
source nerdtree.vim
|
2015-03-20 17:16:03 +00:00
|
|
|
exec "cd " . oldwd
|
|
|
|
|
2015-10-13 18:54:28 +00:00
|
|
|
" set up a line number on the current line but relative above and below to help
|
|
|
|
" with motion commands
|
|
|
|
set number
|
|
|
|
set relativenumber
|
|
|
|
|
2015-10-14 02:48:33 +00:00
|
|
|
" even with the nice space/tab autodetect, prefer 4 for tab stops
|
|
|
|
" but let file type specifics override (for instance a setting of 2 for markdown
|
|
|
|
set tabstop=4
|
|
|
|
" default to folding on syntax
|
|
|
|
set foldmethod=syntax
|
|
|
|
" set a readable width
|
|
|
|
set textwidth=80
|
|
|
|
" make white space visible, where that matters
|
2015-10-14 03:00:13 +00:00
|
|
|
set list!
|
2015-10-14 02:48:33 +00:00
|
|
|
" except for help
|
2015-10-14 03:00:13 +00:00
|
|
|
autocmd FileType help setlocal nolist
|
2015-10-14 02:48:33 +00:00
|
|
|
" set up folding preferences
|
|
|
|
set fde=1
|
|
|
|
" vim's spelling is smart enough for code, to only check comments
|
|
|
|
set spell
|
|
|
|
" add a hint for long lines
|
|
|
|
set colorcolumn=120
|
|
|
|
" default to expanding tabs, I'm not insane
|
|
|
|
set expandtab
|
2015-10-13 15:29:03 +00:00
|
|
|
|
2015-03-27 15:06:56 +00:00
|
|
|
" change buffer behaviors to no longer require changes when hiding a buffer
|
|
|
|
set hidden
|
|
|
|
|
|
|
|
" look for vimrc in the current director as well as $MYVIMRC
|
2015-03-20 17:16:03 +00:00
|
|
|
set exrc
|
2015-03-27 15:06:56 +00:00
|
|
|
" make looking for local changes secure
|
2015-03-20 17:16:03 +00:00
|
|
|
set secure
|
2015-04-01 15:13:36 +00:00
|
|
|
" more secure
|
|
|
|
set modelines=0
|
|
|
|
" preserve some context
|
|
|
|
set scrolloff=3
|
|
|
|
" make the cursor a bit easier to follows
|
|
|
|
set cursorline
|
2015-03-27 15:06:56 +00:00
|
|
|
" make search work a bit more like tab completion in bash
|
2015-03-20 17:16:03 +00:00
|
|
|
set incsearch
|
|
|
|
set wildmode=longest:full
|
|
|
|
set wildmenu
|
2015-03-27 15:06:56 +00:00
|
|
|
" line break handling
|
2015-10-14 02:48:33 +00:00
|
|
|
set linebreak
|
|
|
|
set showbreak=+
|
2015-03-27 15:06:56 +00:00
|
|
|
" always on status line
|
2015-03-20 17:16:03 +00:00
|
|
|
set laststatus=2
|
2015-03-30 15:19:35 +00:00
|
|
|
|
2015-03-30 15:21:15 +00:00
|
|
|
" let backspace work more naturally
|
|
|
|
set backspace=start,indent,eol
|
|
|
|
" favor modern encoding
|
|
|
|
set enc=utf-8
|
|
|
|
" more readable config for list mode
|
|
|
|
set listchars+=nbsp:¬,tab:»·,trail:·
|
|
|
|
set listchars-=eol:$
|
|
|
|
" smarter handling of case during search
|
|
|
|
set ignorecase
|
|
|
|
set smartcase
|
|
|
|
" disable outdated data loss protections
|
|
|
|
set nobackup
|
|
|
|
set noswapfile
|
|
|
|
" make pastemode more accessible
|
|
|
|
set pastetoggle=<F2>
|
2015-04-01 15:13:36 +00:00
|
|
|
" save when moving away
|
|
|
|
au FocusLost * :wa
|
2015-03-30 15:21:15 +00:00
|
|
|
|
2018-03-26 20:03:18 +00:00
|
|
|
" make sure to set TERM to xterm-256color in terminal program or app
|
2018-11-23 14:41:13 +00:00
|
|
|
colorscheme breezy
|
2018-04-04 15:38:43 +00:00
|
|
|
set background=light
|
2018-04-04 15:37:21 +00:00
|
|
|
set termguicolors
|
2018-07-11 12:25:13 +00:00
|
|
|
|
|
|
|
" ensure autoread works, to detect file changes outside the editor
|
|
|
|
set autoread
|
|
|
|
au CursorHold * checktime
|
2018-11-23 14:40:59 +00:00
|
|
|
|
2020-02-06 14:37:51 +00:00
|
|
|
" for gui, make it easier to tell different instances apart
|
2020-05-02 15:18:18 +00:00
|
|
|
set title
|
|
|
|
|
2018-11-23 14:40:59 +00:00
|
|
|
" keep nvim from resetting font back to default from terminal config
|
|
|
|
set guicursor=
|
2019-09-19 20:54:12 +00:00
|
|
|
|
|
|
|
set guioptions-=r
|
|
|
|
set guioptions-=b
|
|
|
|
set guioptions-=T
|
|
|
|
set guioptions-=m
|
|
|
|
|
2020-05-02 15:18:18 +00:00
|
|
|
set gfn=DejaVu\ Sans\ Mono\ for\ Powerline:h13
|
2019-09-19 20:54:12 +00:00
|
|
|
" from https://stackoverflow.com/a/51424640
|
2020-05-02 15:18:18 +00:00
|
|
|
let s:fontsize = 13
|
2019-09-19 20:54:12 +00:00
|
|
|
function! AdjustFontSize(amount)
|
|
|
|
let s:fontsize = s:fontsize+a:amount
|
2019-09-27 19:23:52 +00:00
|
|
|
:execute "set gfn=DejaVu\\ Sans\\ Mono\\ for\\ Powerline:h" . s:fontsize
|
2019-09-19 20:54:12 +00:00
|
|
|
endfunction
|
|
|
|
|
|
|
|
noremap <C-Up> :call AdjustFontSize(1)<CR>
|
|
|
|
noremap <C-Down> :call AdjustFontSize(-1)<CR>
|
|
|
|
inoremap <C-Up> <Esc>:call AdjustFontSize(1)<CR>a
|
|
|
|
inoremap <C-Down> <Esc>:call AdjustFontSize(-1)<CR>a
|
2020-01-18 15:15:37 +00:00
|
|
|
|
2020-01-28 22:36:10 +00:00
|
|
|
" widen the default display of the taskwarrior plugin to make the description
|
|
|
|
" wrap less
|
2020-01-18 15:15:37 +00:00
|
|
|
let g:task_rc_override = 'rc.defaultwidth=120'
|
2020-01-28 22:36:10 +00:00
|
|
|
|
|
|
|
" override the default location of vimwiki and change to markdown
|
2020-03-12 17:38:56 +00:00
|
|
|
let g:vimwiki_list = [{'path': '~/Documents/Wiki', 'syntax': 'markdown', 'ext': '.md'}]
|
2020-01-28 22:36:10 +00:00
|
|
|
let g:vimwiki_dir_link = 'index'
|