Skip to content

Instantly share code, notes, and snippets.

@anish137i
Last active Dec 11, 2019
Embed
What would you like to do?
My Vim RC gvim or mvim
"*****************************************************************************
"" The following vimrc file us used for gvim or mvim files that incluse some quick
": downloaded from https://gist.github.com/anish137i/c318f8a4dfaa7ba47bfc35c29ff89aae
"" setting that support for my work enviorment
"" Them requirement "https://github.com/gosukiwi/vim-atom-dark"
"" Free to use and customize as per your need
"*****************************************************************************
"" Map leader to ,
let mapleader=','
""Always start full screen Max
"set fu
""Enable syntax highlighting
syntax enable
""atom Dark Theme download from github then enable
colo atom-dark
"Activate Numbers line
set number
set relativenumber
""Line spacing left
set ruler
set linespace=3
""Set font size and group windows
set guifont=Consolas:h18
""Seting font in Mac
"set guifont=Monaco:h18
"" Searching
set hlsearch
set incsearch
set ignorecase
set smartcase
"" Search mappings: These will make it so that going to the next one in a
"" search will center on the line it's found in.
nnoremap n nzzzv
nnoremap N Nzzzv
"" Status bar
set laststatus=2
"" Use modeline overrides
set modeline
set modelines=10
set title
set titlestring=%F
set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ col\ %c)\
"" Directories for swp files
set nobackup
set noswapfile
"" Enable Copy Paste in gvim or mvim
vnoremap <C-c> "+y
map <C-v> "+gP
"" Buffer nav
noremap <leader>z :bp<CR>
noremap <leader>q :bp<CR>
noremap <leader>x :bn<CR>
noremap <leader>w :bn<CR>
"*****************************************************************************
"" AutoCommand
"*****************************************************************************
augroup autogroup
autocmd!
autocmd BufWritePost _vimrc source %
augroup END "Writing and Sourcing Vimrc
"*****************************************************************************
"" Others
"*****************************************************************************
set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove left-hand scroll bar
""----Toggling menu option in gvim----
nnoremap <C-F1> :if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>
nnoremap <C-F2> :if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>
nnoremap <C-F3> :if &go=~#'r'<Bar>set go-=r<Bar>else<Bar>set go+=r<Bar>endif<CR>
"*****************************************************************************
"" Abbreviations
"*****************************************************************************
"" fix case sensetive closing
cnoreabbrev W! w!
cnoreabbrev Q! q!
cnoreabbrev Qall! qall!
cnoreabbrev Wq wq
cnoreabbrev Wa wa
cnoreabbrev wQ wq
cnoreabbrev WQ wq
cnoreabbrev W w
cnoreabbrev Q q
cnoreabbrev Qall qall
"*****************************************************************************
"" Vundle Plugin installation
"*****************************************************************************
"" let Vundle manage Vundle, required
"Plugin 'VundleVim/Vundle.vim'
"Plugin 'scrooloose/nerdtree'
"Plugin 'kien/ctrlp.vim'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment