Created
March 11, 2018 11:38
-
-
Save misakar/60674122cee40cbb936f8fdc6e21d0b9 to your computer and use it in GitHub Desktop.
myvimrc
This file contains hidden or 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
" <---------------------------- MuxiVim ---------------------------> | |
" dead simple neovim config | |
" neo1218 @ MIT License | |
" https://github.com/neo1218/muxivim | |
" <----------------------- Plugins Management ----------------------> | |
" vim-plug | |
call plug#begin() | |
" Plug 'vim-scripts/Conque-GDB' | |
Plug 'severin-lemaignan/vim-minimap' | |
" Plug 'alvan/vim-closetag' | |
Plug 'posva/vim-vue' | |
Plug 'Shougo/neocomplete.vim' | |
Plug 'mhinz/vim-startify' | |
" Plug 'vim-airline/vim-airline' | |
" Plug 'vim-airline/vim-airline-themes' | |
Plug 'majutsushi/tagbar' | |
Plug 'kien/ctrlp.vim' | |
Plug 'scrooloose/nerdtree' | |
Plug 'Raimondi/delimitMate' | |
" Plug 'Valloric/YouCompleteMe' | |
Plug 'davidhalter/jedi-vim' | |
Plug 'sjl/gundo.vim' | |
Plug 'tpope/vim-surround' | |
" Plug 'powerline/powerline' | |
Plug 'Xuyuanp/nerdtree-git-plugin' | |
call plug#end() | |
" <----------------------- Auto Command ----------------------------> | |
autocmd! | |
autocmd bufwritepost $MYVIMRC source $MYVIMRC | |
autocmd ColorScheme * highlight ExtraWhitespace ctermbg=green guibg=green | |
autocmd BufWinEnter *.py setlocal foldexpr=SimpylFold(v:lnum) foldmethod=expr | |
autocmd BufWinLeave *.py setlocal foldexpr< foldmethod< | |
autocmd FileType vue syntax sync fromstart | |
" <------------------------- Code Folding ---------------------------> | |
set foldmethod=manual | |
" <---------------------------- Leader ------------------------------> | |
let mapleader = "," | |
" <---------------------------- Key Map ----------------------------> | |
nnoremap <c-u> viwU | |
nnoremap <Leader>c :vs $MYVIMRC<CR> | |
nnoremap <Leader>s :source $MYVIMRC<CR> | |
nnoremap <space> : | |
nnoremap <space>n <space>bn | |
nnoremap <space>p <space>bp | |
nnoremap <C-n> :nohl<CR> | |
nnoremap <silent> <Leader>+ :exe "resize " . (winheight(0) * 5/4)<CR> | |
nnoremap <silent> <Leader>- :exe "resize " . (winheight(0) * 4/5)<CR> | |
noremap <Leader>e :quit<CR> | |
noremap <Leader>E :qa!<CR> | |
noremap <Leader>w :w<CR> | |
inoremap jk <esc> | |
inoremap <C-n> :nohl<CR> | |
set pastetoggle=<F2> | |
set clipboard=unnamed | |
set bs=2 | |
vnoremap <C-n> :nohl<CR> | |
let NERDTreeDirArrows=0 | |
map ; :NERDTreeToggle<CR> | |
map <c-h> <c-w>h | |
map <c-j> <c-w>j | |
map <c-k> <c-w>k | |
map <c-l> <c-w>l | |
map <Leader>n <esc>:tabprevious<CR> | |
map <Leader>m <esc>:tabnext<CR> | |
" vnoremap < <gv | |
" vnoremap > >gv | |
noremap <silent> <expr> j (v:count == 0 ? 'gj' : 'j') | |
noremap <silent> <expr> k (v:count == 0 ? 'gk' : 'k') | |
" <--------------------------- Color Theme ---------------------------> | |
" default color theme is molokai | |
" color moody | |
" color molokai | |
" color primaries | |
color molokai-dark | |
let g:molokai_original = 1 | |
" let g:rehash256 = 1 | |
" color dracula | |
" let g:solarized_termcolors=256 | |
" color solarized | |
" color pt_black | |
" color more | |
" color blackboard | |
syntax enable | |
set background=dark | |
" <---------------------------- Code Syntax ---------------------------> | |
filetype on | |
filetype plugin on | |
filetype plugin indent on | |
syntax on | |
" <--------------------- Tab set (important for pythoner) -------------> | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
vnoremap <space>%ret! 4 <space>op | |
" <-------------------------- More for Vim ---------------------------> | |
" set nonumber " show line num | |
" set numberwidth=1 " number width | |
" set number | |
" set relativenumber " relative number | |
set tw=80 " text width | |
" set colorcolumn=80 " colorful max text width | |
" set wrap linebreak nolist " auto wrap line | |
" highlight ColorColumn ctermbg=233 | |
hi StatusLine ctermbg=grey ctermfg=black | |
" <---------------------------- Format -------------------------------> | |
vmap Q gq | |
nmap Q gqap | |
" <---------------------------- Others -------------------------------> | |
set history=700 | |
set undolevels=700 | |
" <--------------------------- Search Setting -------------------------> | |
set hlsearch | |
set incsearch | |
set ignorecase | |
set smartcase | |
" <----------------- Disable stupid backup and swap files -------------> | |
set nobackup | |
set nowritebackup | |
set noswapfile | |
" <------------- https://github.com/neo1218/MuxiVim/pull/6-------------> | |
" set wrap | |
noremap j gj | |
noremap k gk | |
nnoremap <expr> k (v:count == 0 ? 'gk' : 'k') | |
nnoremap <expr> j (v:count == 0 ? 'gj' : 'j') | |
" <------------------------ vim-startify setting ----------------------> | |
" let g:startify_custom_header = [ | |
" \ ' __ ___ _ __ __ (O)', | |
" \ ' ’ | | | | ` \ \ / / | |\ \ / (_) ', | |
" \ ' | | | | | | \ \_/ / | | \ \ / / _ _ __ ___ ', | |
" \ ' | \__/\ | | | / _ \ | | \ \/ / | | ''_ ` _ \ ', | |
" \ ' | | | | | | / / \ \ | | \ / | | | | | | | ', | |
" \ ' | | |_|____|_|_/_/` `\_\_|_| \/ |_|_| |_| |_| ', | |
" \ ' | |', | |
" \ ' | | ~~ vim for muxistudio ~~ ', | |
" \ ' |_\ -> powered by neo1218 <- ', | |
" \ '', | |
" \ '', | |
" \ ] | |
" | |
" <-------------------------- Plugins Setting -------------------------> | |
" TagBar setting | |
nmap <F8> :TagbarToggle<CR> | |
" vim-airline setting | |
set laststatus=2 | |
" let g:airline_theme="tomorrow" | |
" let g:airline_powerline_fonts = 1 | |
" let g:airline#extensions#tabline#enabled = 1 | |
" let g:airline#extensions#tabline#buffer_nr_show = 1 | |
" nnoremap <C-N> :bn<CR> | |
" nnoremap <C-M> :bp<CR> | |
" set t_Co=256 | |
" let g:Powerline_symbols = 'fancy' | |
" jedi-vim setting | |
let g:jedi#usages_command = "<leader>z" | |
let g:jedi#popup_on_dot = 0 | |
let g:jedi#popup_select_first = 0 | |
map <Leader>b Oimport ipdb; ipdb.set_trace() # BREAKPOINT<C-c> | |
" vim-minimap setting | |
let g:minimap_highlight='Visual' | |
" Python folding | |
set nofoldenable | |
" vim/indentLine setting | |
" delimitMate | |
au FileType python let b:delimitMate_nesting_quotes = ['"'] | |
" vim-gundo | |
nnoremap <F5> :GundoToggle<CR> | |
" vim-vue | |
let g:vue_disable_pre_processors=1 | |
"" vim-closetag | |
"" filenames like *.xml, *.html, *.xhtml, ... | |
"" Then after you press <kbd>></kbd> in these files, this plugin will try to close the current tag. | |
"" | |
"let g:closetag_filenames = '*.html,*.xhtml,*.phtml, *.vue' | |
" | |
"" filenames like *.xml, *.xhtml, ... | |
"" This will make the list of non closing tags self closing in the specified files. | |
"" | |
"let g:closetag_xhtml_filenames = '*.xhtml,*.jsx' | |
" | |
"" integer value [0|1] | |
"" This will make the list of non closing tags case sensitive (e.g. `<Link>` will be closed while `<link>` won't.) | |
"" | |
"let g:closetag_emptyTags_caseSensitive = 1 | |
" | |
"" Shortcut for closing tags, default is '>' | |
"" | |
"let g:closetag_shortcut = '"' | |
" | |
"" Add > at current position without closing the current tag, default is '' | |
"" | |
"let g:closetag_close_shortcut = '<leader>>' | |
" vim-minimap | |
let g:minimap_show='<leader>ms' | |
let g:minimap_update='<leader>mu' | |
let g:minimap_close='<leader>gc' | |
let g:minimap_toggle='<leader>gt' | |
let g:minimap_highlight='Question' | |
" Conque-GDB | |
"待调试文件位于屏幕上方 | |
" let g:ConqueGdb_SrcSplit = 'above' | |
" "保存历史 | |
" let g:ConqueGdb_SaveHistory = 1 | |
" "修改Conque GDB的Leader键 | |
" let g:ConqueGdb_Leader = ',' | |
" "总是显示颜色 | |
" let g:ConqueTerm_Color = 2 | |
" "程序结束运行时,关闭Conque GDB窗口 | |
" let g:ConqueTerm_CloseOnEnd = 1 | |
" "Conque Term配置错误时显示警告信息 | |
" let g:ConqueTerm_StartMessages = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment