JayGwod
7/11/2018 - 10:07 AM

.vimrc

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
" Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

set number
syntax on
set tabstop=2
set shiftwidth=2
set autoindent
set hls is
colorscheme molokai
set term=screen-256color
set t_ut=
execute pathogen#infect()
let g:netrw_browsex_viewer="cmd.exe /C start" 
set runtimepath^=~/.vim/bundle/ctrlp.vim

augroup vimrc_autocmds
    autocmd!
    " highlight characters past column 120
    autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black
    autocmd FileType python match Excess /\%120v.*/
    autocmd FileType python set nowrap
    augroup END

" Bundle 'gabrielelana/vim-markdown'
" Bundle 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
" Powerline setup
" let g:Powerline_symbols = 'fancy'
" set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 9
" set laststatus=2
" set encoding=utf-8 " Necessary to show Unicode glyphs

" Add support for markdown files in tagbar.
let g:tagbar_type_markdown = {
    \ 'ctagstype': 'markdown',
    \ 'ctagsbin' : '~/markdown2ctags/markdown2ctags.py',
    \ 'ctagsargs' : '-f - --sort=yes',
    \ 'kinds' : [
        \ 's:sections',
        \ 'i:images'
    \ ],
    \ 'sro' : '|',
    \ 'kind2scope' : {
        \ 's' : 'section',
    \ },
    \ 'sort': 0,
\ }


if empty(glob('~/.vim/autoload/plug.vim'))
  silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
    \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif

call plug#begin('~/.vim/bundle')
Plug 'iamcco/markdown-preview.vim'
Plug 'iamcco/mathjax-support-for-mkdp'
Plug 'mhinz/vim-startify'
Plug 'godlygeek/tabular'
Plug 'gabrielelana/vim-markdown'
call plug#end()
let g:markdown_enable_spell_checking = 0
let g:markdown_enable_conceal = 1
let g:mkdp_path_to_chrome = "cmd.exe /C start" 
    " 设置 chrome 浏览器的路径(或是启动 chrome(或其他现代浏览器)的命令)
    " 如果设置了该参数, g:mkdp_browserfunc 将被忽略
let g:mkdp_auto_close = 0
    " 在切换 buffer 的时候自动关闭预览窗口,设置为 0 则在切换 buffer 的时候不
    " 自动关闭预览窗口
let g:ackprg = 'ag --nogroup --nocolor --column'

set pastetoggle=<F9>
nmap <F7> <Plug>MarkdownPreview
nmap <F6> <Plug>StopMarkdownPreview
nmap <F8> :TagbarToggle<CR>
nmap <F10> :NERDTreeToggle<CR>
nmap <F11> :NERDTreeFind<CR>