Last active
December 20, 2019 04:08
-
-
Save shekcon/2a4280c0770ca96f1a5fb5deed112fe7 to your computer and use it in GitHub Desktop.
[Vim] My configure of vim #vim #personal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// vim: syntax=vimscript | |
set t_Co=256 | |
set nocompatible | |
filetype plugin indent on | |
:set clipboard=unnamedplus | |
""basic config"" | |
syntax on | |
set relativenumber | |
set incsearch | |
set ignorecase | |
set smartcase | |
set nohlsearch | |
set noswapfile | |
set nowrap | |
set nobackup | |
set expandtab | |
set shiftwidth=4 | |
set softtabstop=0 | |
set tabstop=4 | |
set number | |
set bs=2 | |
""set backspace=indent,eol | |
""Mapping"" | |
nmap <silent> <C-s> :w<CR> | |
nnoremap <S-z> :q!<CR> | |
inoremap <F2> <Esc>:q!<CR> | |
vnoremap <S-z> <Esc>:q!<CR> | |
nnoremap <C-z> :q<CR> | |
inoremap <C-z> <Esc>:q<CR> | |
vnoremap <C-z> <Esc>:q<CR> | |
nnoremap <C-w> :w<CR> | |
inoremap <C-w> <Esc>:w<CR> | |
vnoremap <C-w> <Esc>:w<CR> | |
nnoremap <S-w> :x!<CR> | |
"inoremap <F5> <Esc>:x!<CR> | |
vnoremap <S-w> <Esc>:x!<CR> | |
""vnoremap <C-c> "*yy | |
noremap <C-d> :sh<cr> | |
inoremap <C-d> <Esc>:sh<CR> | |
vnoremap <C-d> <Esc>:sh<CR> | |
"map undo and redo" | |
inoremap <C-r> <Esc><C-r> | |
inoremap <C-u> <Esc>u | |
nnoremap r <C-r> | |
set pastetoggle=<F8> | |
set encoding=utf-8 | |
" nnoremap <C-t> :tabnew<CR> | |
" inoremap <C-t> :tabnew<CR> | |
set mouse=a | |
""inoremap <A-r> <Esc>:so<Space>~/.vimrc<CR> | |
""nnoremap <A-r> :so<Space>~/.vimrc<CR> | |
" auto fair" | |
""Mapping copy cut paste"" | |
"copy" | |
vmap <C-c> "+y | |
nmap <C-c> "+Y | |
imap <C-c> <Esc>"+Y i | |
"cut" | |
vmap <C-x> "+y gvd | |
nmap <C-x> "+Y dd | |
imap <C-x> <Esc><Esc><Esc> "+Y dd i | |
"paste" | |
nmap <C-v> "+P | |
imap <C-v> <Esc><Esc><Esc> "+P | |
vmap <C-v> <Esc><Esc><Esc> "+P | |
"ctrl-a" | |
imap <C-a> <Esc>ggVG | |
vmap <C-a> ggVG | |
nmap <C-a> ggVG | |
"backspace" | |
vmap <Space> x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment