vim config updates
This commit is contained in:
@@ -1,9 +1,30 @@
|
||||
syntax on
|
||||
set smarttab ts=2 sw=2
|
||||
set softtabstop=2
|
||||
set softtabstop=2
|
||||
set expandtab
|
||||
set autoindent
|
||||
|
||||
" line length is 88
|
||||
set textwidth=88
|
||||
|
||||
" Enable soft wrapping
|
||||
set wrap
|
||||
|
||||
" Wrap at word boundaries
|
||||
set linebreak
|
||||
|
||||
" Maintain indentation on wrapped lines
|
||||
set breakindent
|
||||
|
||||
" Optional: visual indicator for wrapped lines
|
||||
set showbreak=↪\
|
||||
|
||||
" Navigate visual lines instead of logical lines
|
||||
nnoremap j gj
|
||||
nnoremap k gk
|
||||
vnoremap j gj
|
||||
vnoremap k gk
|
||||
|
||||
set backspace=indent,eol,start
|
||||
|
||||
set background=dark
|
||||
@@ -12,6 +33,10 @@ colorscheme theunixzoo
|
||||
"colorscheme aomi-grayscale
|
||||
"colorscheme solarized8
|
||||
|
||||
" any trailing spaces are indicated by a ·
|
||||
set list
|
||||
set listchars=trail:·
|
||||
|
||||
"source /home/jswank/.config/nvim/colors-now
|
||||
|
||||
"set gfn=Droid\ Sans\ Mono\ 10
|
||||
@@ -21,9 +46,6 @@ set guioptions-=T
|
||||
"use semicolon as colon for commands
|
||||
nmap ; :
|
||||
|
||||
"disable mouse support (nvim)
|
||||
set mouse=
|
||||
|
||||
filetype plugin on
|
||||
filetype indent on
|
||||
set ofu=syntaxcomplete#Complete#
|
||||
@@ -31,12 +53,7 @@ set ofu=syntaxcomplete#Complete#
|
||||
" au FileType python setlocal tabstop=4 expandtab shiftwidth=4 softtabstop=4
|
||||
au FileType markdown setlocal tabstop=4 expandtab shiftwidth=4 softtabstop=4
|
||||
|
||||
" enable snippets
|
||||
" let g:UltiSnipsExpandTrigger="<tab>"
|
||||
" list all snippets
|
||||
" let g:UltiSnipsListSnippets="<c-l>"
|
||||
|
||||
" typing idate inserts the current date
|
||||
" typing idate inserts the current date
|
||||
iab idate <c-r>=strftime("%Y-%m-%d")<cr>
|
||||
|
||||
" use \ toc to insert a table of contents for markdown from the current line to EOF
|
||||
@@ -65,7 +82,6 @@ set cursorline " highlights the current line
|
||||
" Search down into subfolders
|
||||
set path+=**
|
||||
|
||||
|
||||
" netrw config
|
||||
let g:netrw_banner=0 " disable annoying banner
|
||||
let g:netrw_browse_split=0 " open in prior window
|
||||
@@ -78,7 +94,7 @@ let g:netrw_liststyle=3 " tree view
|
||||
" - <CR>/v/t to open in an h-split/v-split/tab
|
||||
" - check |netrw-browse-maps| for more mappings
|
||||
|
||||
" fzf-lua shortcuts
|
||||
" fzf.vim shortcuts
|
||||
nnoremap <c-p> <cmd>Files<CR>
|
||||
nnoremap <c-\> <cmd>Buffers<CR>
|
||||
nnoremap <c-g> <cmd>Rg<CR>
|
||||
@@ -111,25 +127,24 @@ let g:go_highlight_build_constraints = 1
|
||||
" disable folding for markdown
|
||||
let g:vim_markdown_folding_disabled = 1
|
||||
|
||||
" ancient stuff
|
||||
"let g:hcl_fmt_autosave = 1
|
||||
"let g:tf_fmt_autosave = 1
|
||||
"let g:nomad_fmt_autosave = 1
|
||||
|
||||
" ancient stuff
|
||||
"
|
||||
"autocmd BufRead,BufNewFile *.go set makeprg=go\ build
|
||||
"map <leader>gr <ESC>:!gorun %<CR>
|
||||
|
||||
"for javascript:
|
||||
"for javascript:
|
||||
"use google closure to generate errors
|
||||
":set makeprg=closure\ --js\ %
|
||||
"javac style errors
|
||||
":setl efm=%A%f:%l:\ %m,%+Z%p^,%+C%.%#,%-G%.%#
|
||||
":setl efm=%A%f:%l:\ %m,%+Z%p^,%+C%.%#,%-G%.%#
|
||||
|
||||
"autocmd BufRead,BufNewFile *.js :call My_JS()
|
||||
"function! My_JS()
|
||||
"function! My_JS()
|
||||
" set makeprg=closure\ --js\ %
|
||||
" setl efm=%A%f:%l:\ %m,%+Z%p^,%+C%.%#,%-G%.%#
|
||||
" setl efm=%A%f:%l:\ %m,%+Z%p^,%+C%.%#,%-G%.%#
|
||||
"endfunction
|
||||
|
||||
"map <leader>hh :!tidy -q -i --show-errors 0<CR>
|
||||
|
||||
Reference in New Issue
Block a user