Skip to content

Instantly share code, notes, and snippets.

View greghor's full-sized avatar

Gregoire Hornung greghor

View GitHub Profile
noremap ,gc :Gcommit % -m "
noremap ,gsh :Gpush<CR>
noremap ,gs :Gstatus<CR>
noremap ,gd :Gvdiff<CR>
@greghor
greghor / copy-if-file-exists
Created January 23, 2020 11:22
copy .gitignore in all folders that contains a .gitkeep
#adapted from https://unix.stackexchange.com/a/180616
find . -name ".gitkeep" -exec sh -c '
for file do
dir=${file%/*}
cp data/raw/.gitignore "$dir"
done' sh {} +
" ipython-shell
noremap ,ss :call StartPyShell()<CR>
noremap ,sk :call StopPyShell()<CR>
" code execution
nnoremap ,l :call PyShellSendLine()<CR>
noremap <silent> <C-n> :call RunTmuxPythonCell(0)<CR>
noremap <C-a> :call RunTmuxPythonAllCellsAbove()<CR>
@greghor
greghor / vimrc-header.vim
Last active September 30, 2019 09:14
vimrc header for vim-plug
filetype plugin on
"*****************************************************************************
"" Vim-PLug core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
endif
let g:vim_bootstrap_langs = "python"
let g:vim_bootstrap_editor = ""
filetype plugin on
"*****************************************************************************
"" Vim-PLug core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
endif
let g:vim_bootstrap_langs = "python"