Home | Projects | Notes > Unix/Linux > .vimrc
A setting file used by Vim
Saves the default settings for the Vim editor when it is opened
Allows users to customize options for the editor
xxxxxxxxxx731"*******************************************************************************2" @file     : .vimrc (Vim Run Command)3" @brief    : Optimized for C/C++ development, but useful also for other things4" @author   : Kyungjae Lee5" @date     : Jan 14, 2021 - Created file6"*******************************************************************************7
8"-------------------------------------------------------------------------------9" Development Environment Configuration10"-------------------------------------------------------------------------------11
12" turn line numbers on13set number14
15" wrap line at 90 chars 16"set textwidth=9017                                        18" mark the end of the desired textwidth19set colorcolumn=8020highlight ColorColumn ctermbg=DarkGray21
22" display current column number23set ruler24
25" highlight all search matches 26set hlsearch27
28" configure tabwidth and insert spaces instead of tabs 29set tabstop=430set shiftwidth=431
32" use indentation of previous line33set autoindent34
35" use intelligent indentation for C36set smartindent37
38" use auto-comment in new line (use ctrl-u in insert mode to delete the 39" automatically inserted comment markers in one key-chord)40set formatoptions=tcroql41
42" enable syntax color scheme43syntax on44
45" fixes glitch? in colors when using vim with tmux46set background=dark47set t_Co=25648
49" underline the current line50"highlight CursorLine cterm=NONE ctermbg=NONE ctermfg=NONE guibg=NONE guifg=NONE51set cursorline52
53" configure the line number54"highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE55
56" configure comment color 57highlight Comment ctermfg=DarkGreen58
59" configure statusline60set laststatus=261" display the full path of the currently open file62set statusline+=%F63" display the line and column numbers left-justified64set statusline+=\ %=L%l:%=C%c65" highlight the statusline                                                                                       66highlight StatusLine ctermfg=Blue67
68"-------------------------------------------------------------------------------69" Key Bindings70"-------------------------------------------------------------------------------71
72" personal auto-commenting template                                             73map <F7> o/* <CR>@KyungjaeLee <C-R>=strftime("%m/%d/%Y")<CR><CR>/<ESC><UP><UP>