Skip to content

Instantly share code, notes, and snippets.

View DineshReddyK's full-sized avatar

Dinesh Reddy K DineshReddyK

  • Nokia
  • Bangalore
View GitHub Profile
@DineshReddyK
DineshReddyK / vimtemplate.vim
Last active August 29, 2015 14:04
Vim template
"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
@DineshReddyK
DineshReddyK / autocorrect.vim
Last active August 29, 2015 14:04
Auto correct
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>
@DineshReddyK
DineshReddyK / autocomment.vim
Created July 25, 2014 16:17
Vim Auto Comment
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
@DineshReddyK
DineshReddyK / .gdbinit
Last active August 29, 2015 14:07 — forked from skyscribe/.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