Skip to content

Instantly share code, notes, and snippets.

@badpenguin
Created September 23, 2017 22:32
Show Gist options
  • Save badpenguin/de6827298984f39969aca91791a6f35f to your computer and use it in GitHub Desktop.
Save badpenguin/de6827298984f39969aca91791a6f35f to your computer and use it in GitHub Desktop.
" CORE
set nocompatible
set enc=utf-8
" GUI
syntax on
colorscheme pablo
" Formatting / Indent
set modeline " last lines in document sets vim mode
set modelines=3 " number lines checked for modelines
set tabstop=4 " numbers of spaces of tab character
set shiftwidth=4 " numbers of spaces to (auto)indent or >> and <<
set smartindent " smart indent
set autoindent " always set autoindenting on
set noexpandtab " AVOID tabs converted to spaces
set showmatch " show matching braces, somewhat annoying...
set nowrap " don't wrap lines
" Search
set ignorecase " ignore case when searching
set smartcase " override the 'ignorecase' option if the search pattern contains upper case characters
set incsearch " do incremental searching
set hlsearch " highlight searches
set wrapscan " searches wrap around the end of the file
" Status line
set laststatus=2 " allways show the status line
set scrolloff=5 " keep 5 lines when scrolling
set showcmd " display incomplete commands
set nonumber " DONT show line numbers
set cmdheight=1 " Number of screen lines to use for the command-line
" AGX: NEW STATUSLINE
set statusline=%f\ [%{&ff}]\ %y\ %=%w%r%h%w%m\ [%c,%l\]\ %p\%%/%L
" higlight status bar on insert
au InsertEnter * hi StatusLine term=reverse ctermfg=0 ctermbg=7
au InsertLeave * hi StatusLine term=reverse ctermbg=0 ctermfg=7
hi StatusLine term=reverse ctermbg=0 ctermfg=7 gui=bold,reverse
" AGX: When .vimrc is edited, reload it
autocmd! bufwritepost .vimrc source ~/.vimrc
"debian Y-and-P fix
set viminfo='10,f0,<10000,c
" Wild Menu
source $VIMRUNTIME/menu.vim
set wildmenu
set cpo-=<
set wildcharm=<C-Z>
" customize menu
"aunmenu Help.
"aunmenu Window.
" keyboard mapping
"map <F1> :emenu <C-Z>
nnoremap <F2> :b <C-Z>
nnoremap <F3> :let perl_fold=1 <C-Z>
map <F5> :previous<CR> " map F1 to open previous buffer
map <F6> :next<CR> " map F2 to open next buffer
" enable FT pluging
"filetype on
"filetype plugin on
" Cygnus
if &term == "cygwin"
set background=dark
endif
" test Windows Shortuts
vmap <C-c> "+yi
vmap <C-x> "+c
vmap <C-v> c<ESC>"+p
imap <C-v> <C-r><C-o>+
" ansible yaml
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment