Skip to content

Instantly share code, notes, and snippets.

@hqf00342
Created January 6, 2019 13:02
Show Gist options
  • Save hqf00342/de55b5951e86e28bf4c640020231f31c to your computer and use it in GitHub Desktop.
Save hqf00342/de55b5951e86e28bf4c640020231f31c to your computer and use it in GitHub Desktop.
syntax on
set number
set autoindent
set smartindent
set hlsearch
set incsearch
set ignorecase
set smartcase
set showmatch "highlight ()"
set matchtime=1 "showmatch time (unit:0.1sec)"
set gdefault "g option is default for replace"
set smarttab
set expandtab "convet TAB to SPACE"
set tabstop=4 "indent width"
set shiftwidth=4 "auto indent width"
set visualbell t_vb=
set noerrorbells
set wildmenu
set wildmode=longest:full
set backspace=indent,eol,start
set ttyfast
set laststatus=2
set showcmd
set encoding=utf-8
set termencoding=utf-8
set fileencoding=utf-8
set fileformats=unix,dos
"toggle paste mode with F2 :set paste <=> :set nopaste""
nnoremap <F2> :set invpaste paste?<CR>
set pastetoggle=<F2>
"clear hlsearch with <ESC><ESC>"
nnoremap <silent> <ESC><ESC> :nohlsearch<CR>
set statusline=%F "filename"
set statusline+=%m "edit mark [+]"
set statusline+=%r "readonly"
set statusline+=%w "preview"
set statusline+=%= "to right alignement"
set statusline+=[char=\%04.4B] "char code"
set statusline+=[%v,%l/%L] "cursor locate (x,y/max)"
set statusline+=(%p%%) "line percent"
set statusline+=[%{has('multi_byte')&&\&fileencoding!=''?&fileencoding:&encoding}]
set showmode
filetype plugin indent on
"for python"
if expand("%:t")=~ ".*\.py"
set expandtab
set tabstop=2
set shiftwidth=2
set list
set listchars=tab:>-,extends:<,trail:-
endif
"for php"
if expand("%:t")=~ ".*\.php"
set expandtab
set tabstop=2
set shiftwidth=2
endif
"vim: ts=2:sw=2:tw=80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment