Vim: Insert debug statements according to filetype

I’ve got a little keybinding in my .vimrc file which inserts a debug statement into a file, and then saves it; map <Leader>db Odebugger; 1<CR><ESC>:w<CR> So, if I’m editing foo.rb with my cursor on line 2; 1 def hello 2 puts "Hello, world!" 3 end Then if I hit ,db the file will look like this; 1 def hello 2 debugger; … Continue reading Vim: Insert debug statements according to filetype