diff options
| author | Nirmal Kumar R <tildezero@gmail.com> | 2026-05-31 13:28:41 +0530 |
|---|---|---|
| committer | Nirmal Kumar R <tildezero@gmail.com> | 2026-05-31 13:28:41 +0530 |
| commit | debff8673cad612ad55fa1a3aa18347c2b9849c3 (patch) | |
| tree | 90ec3d4668ea3b31e5a7333972d5b8a2084719c6 | |
| parent | fd978120d733381c6aef37db61a6623c0ddfccd9 (diff) | |
Update C enhancements in vimrc
| -rw-r--r-- | .vimrc | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -4,6 +4,7 @@ set laststatus=2 set t_Co=256 set encoding=utf-8 set autoindent +set smartindent set magic set number set scrolloff=3 @@ -23,6 +24,7 @@ set mouse=a set noswapfile set nofoldenable set lazyredraw +set t_Co=256 filetype on filetype plugin on @@ -30,10 +32,11 @@ filetype indent on syntax enable " :color shine +:colorscheme jellybeans autocmd FileType markdown setlocal tw=80 et ts=2 sw=2 autocmd FileType text setlocal tw=80 -autocmd FileType c,cpp set formatoptions+=ro +autocmd FileType c,cpp set set tabstop=4 shiftwidth=4 expandtab autocmd FileType c set omnifunc=ccomplete#Complete autocmd FileType html,xhtml,css,xml,xslt set shiftwidth=2 softtabstop=2 autocmd FileType vim,lua,nginx set shiftwidth=2 softtabstop=2 @@ -43,4 +46,18 @@ autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=0 autocmd FileType asm set noexpandtab shiftwidth=8 softtabstop=0 syntax=nasm +" Enhanced keyboard mappings +" +" in normal mode F2 will save the file +nmap <F2> :w<CR> + +" in insert mode F2 will exit insert, save, enters insert again +imap <F2> <ESC>:w<CR>i + +" switch between header/source with F4 +map <F4> :e %:p:s,.h$,.X123X,:s,.c$,.h,:s,.X123X$,.c,<CR> + +map <F5> :make<CR> +map <F6> :make clean all<CR> + set notermguicolors |
