Last active
September 3, 2019 21:34
-
-
Save whot/db2139437a267f0234a033ece1875c24 to your computer and use it in GitHub Desktop.
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 to insert a printf statement at the current line when typing "mm" in normal (not insert) mode | |
" useful for sprinkling debugging statements across files quickly | |
function! InsertMarker() | |
let string = "printf(\"::::::::: %s:%d:%s() - \\n\", __FILE__, __LINE__, __func__);" | |
call append(line('.'), string) | |
endfunction | |
command Marker call InsertMarker() | |
map mm :Marker<enter> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment