Skip to content

Instantly share code, notes, and snippets.

@sooop
Last active December 21, 2015 08:38
Show Gist options
  • Save sooop/6279341 to your computer and use it in GitHub Desktop.
Save sooop/6279341 to your computer and use it in GitHub Desktop.
my vimrc for windows
""settings for comportable use
set nocp
set bs=2
""set visualbell
set showmatch
""Character encoding and GUI Font settings
"""" set encoding to UTF-8
set enc=utf-8
set fenc=utf-8
""""settings for GUI fonts
if has('gui')
set guifont=Consolas:h9:cANSI
set guifontwide=Dotumche:h10:cDEFAULT
color desert
else
""command line mode use 'slate' theme
color slate
endif
""file type settings
""""file type detect
filetype on
filetype plugin on
""""settings for syntax highlight
au VimEnter * syntax on
"" support clipboard Copy and Paste
if has('clipboard')
" set clipboard=unnamed
map <F3> "+Y
map <F4> "+gP
imap <F3> "+Y
imap <F4> <ESC>"+gPi
vmap <F3> "+y
vmap <F4> x"+gP
endif
"""" <Select All>
map <F9> ggvG
map <F2> :nohls<Enter>
"Setting for search
""""settings for search
set is
set hls
""""search selected text
vmap <C-G> y/<C-R>0<CR>
""settings for tab
""""set tab's width to 4
set tabstop=4
set shiftwidth=4
"""" replace \t to space
"set expandtab
""indent setting
""""set smart indent and auto indent
set smartindent
set autoindent
"" C file use c indent
au Filetype *.c set cindent
\| map <F7> :w<Enter>:!gcc -g % -o %<<Enter>
"""" % : currnet filename,
"""" %<: current filename without extension
\| map <F8> :!./%<<Enter>
\| set cindent
au Filetype *.py set nocindent
\| map <F7> :w<Enter>:!c:\python27\python.exe %<Enter>
"moving around windows
map <C-E> <C-W>w<C-W>_
"settings for Korean Windows
if has('win32')
"""" default directory, gcc complier shortcut and editing hosts shorcut
lcd c:\temp
au Filetype *.c map <F7> :w<Enter>:!D:\Dev-Cpp\bin\gcc -g % -o %<<Enter>
map <F12> :tabe c:\windows\system32\drivers\etc\hosts<Enter>
"""" using UTF-8 cause broken menu UI, so reload menu in english version
lang mes en_US
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment