-
jq — https://jqlang.github.io/jq/ — "like sed for JSON data"
There are several options available for installing jq. I prefer to use Homebrew:
brew install jq
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
":[range]SortUnfolded[!] [i][u][r][n][x][o] [/{pattern}/] | |
" Sort visible lines in [range]. Lines inside closed folds | |
" are kept intact; sorting is done only on the first line | |
" of the fold; the other lines inside the fold move with | |
" it as a unit. | |
" Copyright: (C) 2018 Israel Chauca | |
" 2012 Ingo Karkat | |
" The VIM LICENSE applies to this scriptlet; see ':help copyright'. | |
" Inspiration: | |
" http://stackoverflow.com/questions/13554191/sorting-vim-folds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# comments example for .dat or .ledger files | |
@smallexample | |
; This is a single line comment, | |
# and this, | |
% and this, | |
| and this, | |
* and this. | |
# If you have a deeply nested tree of accounts, | |
# it may be convenient to define an alias, for example: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function command_not_found_handle { | |
{echo "It looks like you're trying to run a UNIX command.";echo "Would you like some help with that?"; echo; /usr/lib/command-not-found $1 2>&1|fold -sw 55}|cowsay -f$HOME/.clippy -n | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nnoremap <silent><expr><leader>m ":<C-U>let @".v:register." = ".string(getreg(v:register))."<CR><C-F>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Toggle Comment | |
augroup toggle_comment | |
au FileType vim let b:comment_leader = '" ' | |
au FileType c,cpp,java let b:comment_leader = '// ' | |
au FileType sh,make,python let b:comment_leader = '# ' | |
au FileType text let b:comment_leader = '% ' | |
augroup END | |
function! ToggleComment() range | |
let cl = b:comment_leader; | |
for linenr in range(a:firstline, a:lastline) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function tmux_create_or_reattach() { tmux has-session -t $1 && tmux attach -t $1 || tmux -u -L $1; } | |
tmux_create_or_reattach weechat-curses |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if &readonly | |
nnoremap <silent><buffer> <Esc> :quit<CR> | |
nnoremap <silent><buffer> <CR> <C-]> | |
nnoremap <silent><buffer> <BS> <C-O> | |
nnoremap <silent><buffer> <Down> :call search('\(''\<bar><bar>\)[^, <bar>]\{-1,}\1', 'W')<CR> | |
nnoremap <silent><buffer> <Up> :call search('\(''\<bar><bar>\)[^, <bar>]\{-1,}\1', 'Wb')<CR> | |
endif |
NewerOlder