Files

59 lines
1.3 KiB
VimL

" ntnsndr's vim settings
" Basics
set noerrorbells
set notermguicolors
set autoread
" Spellcheck
set spell
hi clear SpellBad
hi SpellBad cterm=underline
" Margins
set foldcolumn=2
highlight FoldColumn ctermbg=NONE
" Line wrapping in Markdown files
autocmd FileType markdown setlocal linebreak
autocmd FileType markdown noremap j gj
autocmd FileType markdown noremap k gk
autocmd FileType markdown inoremap <buffer> <Down> <C-o>gj
autocmd FileType markdown inoremap <buffer> <Up> <C-o>gk
" Turn on engines after filetype commands
syntax on
" Tabs
set tabstop=4
set shiftwidth=4
set expandtab
"Search
set ic
set smartcase
set incsearch
" Workspace location
let g:workspace_session_directory = $HOME . '/.vim/sessions/'
" Terminal
set shell=bash\ -l
tnoremap <Esc> <C-\><C-n>
" Shortcuts
command! Proximate :e ~/Cloud/Notes/Proximate.md
command! W w | bp | bw #
command! Q :wa|qa
command! -range Comment call CommentWrap(<line1>, <line2>)
function! CommentWrap(start, end)
" Insert closing comment after the last line
call append(a:end, '--->')
" Insert opening comment before the first line
call append(a:start - 1, '<!---')
endfunction
" Create panda command for pandout
command! -nargs=1 Panda execute ':w' | execute ':!~/.scripts/panda.sh % <args>'