Skip to content

Instantly share code, notes, and snippets.

@cytopia
cytopia / .bash_git.sh
Last active August 29, 2016 21:28
Manage multiple git identities
#
# Handle git identities
#
# Load this in your bash/zsh config
#
# Show identity
git-ident-show() {
git config --get user.name
git config --get user.email
@cytopia
cytopia / make-vim-project
Created October 17, 2015 10:33
Vim workflow for project and ctag files
#------------------------------------------------------
#-------- CTAGS
make-ctags() {
ctags -RBF -f .tags \
--file-scope=yes \
--sort=yes \
--extra=+fq \
2>/dev/null
}
make-ctags-css() {
@cytopia
cytopia / ranger-as-file-explorer-in-vim.vim
Last active July 15, 2023 00:15
Ranger as file explorer in vim
function RangerExplorer()
exec "silent !ranger --choosefile=/tmp/vim_ranger_current_file " . expand("%:p:h")
if filereadable('/tmp/vim_ranger_current_file')
exec 'edit ' . system('cat /tmp/vim_ranger_current_file')
call system('rm /tmp/vim_ranger_current_file')
endif
redraw!
endfun
map <Leader>x :call RangerExplorer()<CR>