Skip to content

Instantly share code, notes, and snippets.

@etng
Created June 11, 2020 01:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etng/a9d795274ac214fd1c5778fbd1157b8a to your computer and use it in GitHub Desktop.
Save etng/a9d795274ac214fd1c5778fbd1157b8a to your computer and use it in GitHub Desktop.
设置vim
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
cat<<'EOT'>~/.vimrc
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
let g:fzf_install = 'yes | ./install'
" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'do': g:fzf_install }
" Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
Plug 'fatih/vim-go'
Plug 'tpope/vim-fugitive'
Plug 'fatih/vim-go'
call plug#end()
"execute pathogen#infect()
"
"colorscheme desert
"" set ai
set hls
set incsearch
set number
set relativenumber
set expandtab
set smarttab
set smartindent
set cursorline
set fileencodings=utf-8,gbk
set shiftwidth=4
set tabstop=4
set bs=2
set list
set paste
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8
nnoremap <leader>l :ls<CR>:b<space>
filetype plugin indent on
syntax on
set noai
let g:vim_markdown_folding_disabled = 1
:iabbrev dci (describe " "<CR> (context " "<CR> (it " "<CR> #body here#)))
" nnoremap ; :
" " nnoremap j gj
" " nnoremap k gk
"
" "iabbrev @me etng2004@gmail.com
" "iabbrev @rm bo.yi@kankanapp.com.cn
"
" "iabbrev adn and
" "iabbrev waht what
" "iabbrev tehn then
"
" " Allow saving of files as sudo when I forgot to start vim using sudo.
" cmap w!! w !sudo tee > /dev/null %
"
EOT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment