Skip to content

Instantly share code, notes, and snippets.

Avatar

Dinesh Reddy K DineshReddyK

  • Nokia
  • Bangalore
View GitHub Profile
View .gdbinit
#
# STL GDB evaluators/views/utilities - 1.03
#
# The new GDB commands:
# are entirely non instrumental
# do not depend on any "inline"(s) - e.g. size(), [], etc
# are extremely tolerant to debugger settings
#
# This file should be "included" in .gdbinit as following:
# source stl-views.gdb or just paste it into your .gdbinit file
View autocorrect.vim
augroup abbrcmds
autocmd!
"short hands for cpp
autocmd FileType cpp :iabbrev iff if ()<left>
autocmd FileType cpp :iabbrev elf else if ()<left>
autocmd FileType cpp :iabbrev elsee else ()<left>
"short hands for shell
autocmd FileType sh :iabbrev iff if []<left>
autocmd FileType sh :iabbrev elf elseif []<left>
View autocomment.vim
augroup commentcmds
autocmd!
autocmd FileType python nnoremap <buffer> ,c I#<esc>
autocmd FileType sh nnoremap <buffer> ,c I#<esc>
autocmd FileType cpp nnoremap <buffer> ,c I//<esc>
autocmd FileType c nnoremap <buffer> ,c I//<esc>
augroup END
View vimtemplate.vim
"vim to load default templates on opening cpp/c/sh files
augroup templates
autocmd!
"Auto load wile creating new files
autocmd BufNewFile *.cpp 0r ~/.vim/templates/skeleton.cpp
autocmd BufNewFile *.c 0r ~/.vim/templates/skeleton.c
autocmd BufNewFile *.sh 0r ~/.vim/templates/skeleton.sh
augroup END