mirror of
https://github.com/lloeki/vimfiles.git
synced 2025-12-06 05:24:39 +01:00
Add simple formatting tools
This commit is contained in:
parent
42ba3d457f
commit
eb60df1903
1 changed files with 16 additions and 0 deletions
16
vimrc
16
vimrc
|
|
@ -261,6 +261,22 @@ augroup vimrc
|
|||
autocmd! BufNewFile,BufRead crontab.* setl nobackup | setl nowritebackup " Fix for crontab -e
|
||||
augroup END
|
||||
|
||||
" Formatting
|
||||
function! FormatJSON()
|
||||
execute ":'<,'>! jq"
|
||||
endfunction
|
||||
map <leader>fj :call FormatJSON()<CR>
|
||||
|
||||
function! FormatColumnize()
|
||||
execute "'<,'>! column -t"
|
||||
endfunction
|
||||
map <leader>fc :call FormatColumnize()<CR>
|
||||
|
||||
function! FormatSort()
|
||||
execute "'<,'>! sort"
|
||||
endfunction
|
||||
map <leader>fs :call FormatSort()<CR>
|
||||
|
||||
" Go tools path
|
||||
let g:go_bin_path = expand('$HOME') . "/.local/libexec/go/bin"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue