Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " Plugins {{{
- call plug#begin('~/.config/nvim/plugged')
- Plug 'tpope/vim-sensible'
- Plug 'junegunn/seoul256.vim'
- Plug 'vim-syntastic/syntastic'
- Plug 'godlygeek/tabular' "must come before vim-markdown
- Plug 'plasticboy/vim-markdown'
- Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() } }
- Plug 'sheerun/vim-polyglot'
- Plug 'tpope/vim-surround'
- Plug 'scrooloose/nerdcommenter'
- Plug 'thaerkh/vim-indentguides'
- " Plug 'Yggdroot/indentLine'
- call plug#end()
- filetype plugin on
- filetype indent on
- " }}}
- " Look and feel of vim {{{
- let mapleader = ","
- set number
- " Unified color scheme (default: dark)
- colorscheme elflord
- " set background=dark
- set pastetoggle=<C-P>
- " Copy and paste.
- set clipboard+=unmappedplus
- " Copy to clipboard
- vnoremap <leader>y "+y
- nnoremap <leader>Y "+yg_
- nnoremap <leader>y "+y
- nnoremap <leader>yy "+yy
- " Paste from clipboard
- nnoremap <leader>p "+p
- nnoremap <leader>P "+P
- vnoremap <leader>p "+p
- vnoremap <leader>P "+P
- " Quickfix next and previous
- :nmap <leader>] :lnext<CR>
- :nmap <leader>[ :lprevious<CR>
- " }}}
- " Language Specific {{{
- syntax on
- " Python
- let g:pyindent_open_paren = '&sw * 2' " Default values
- " set tabstop=2 shiftwidth=2 expandtab
- " set list
- " set lcs=tab:>-,trail:-
- " nmap <silent> <leader>+ :call ToggleIndentGuidesTabs()<cr>
- " nmap <silent> <leader>= :call ToggleIndentGuidesSpaces()<cr>
- " function! ToggleIndentGuidesTabs()
- " if exists('b:iguides_tabs')
- " setlocal nolist
- " let &l:listchars = b:iguides_tabs
- " unlet b:iguides_tabs
- " else
- " let b:iguides_tabs = &l:listchars
- " setlocal listchars=tab:┆\ "protect the space
- " setlocal list
- " endif
- " endfunction
- " function! ToggleIndentGuidesSpaces()
- " if exists('b:iguides_spaces')
- " call matchdelete(b:iguides_spaces)
- " unlet b:iguides_spaces
- " else
- " let pos = range(1, &l:textwidth, &l:shiftwidth)
- " call map(pos, '"\\%" . v:val . "v"')
- " let pat = '\%(\_^\s*\)\@<=\%(' . join(pos, '\|') . '\)\s'
- " let b:iguides_spaces = matchadd('CursorLine', pat)
- " endif
- " endfunction
- " vnoremap <NL> :python %<CR>
- nnoremap <NL> :!python %<CR>
- nnoremap <C-X> :w<CR>:!python %<CR>
- inoremap <C-X> <ESC>:w<CR>:!python %<CR>
- " }}}
- " Plugins and settings {{{
- " nerdcommenter
- let NERDSpaceDelims=1
- " Syntastic
- set statusline+=%#warningmsg#
- set statusline+=%{SyntasticStatuslineFlag()}
- set statusline+=%*
- let g:syntastic_always_populate_loc_list = 1
- let g:syntastic_auto_loc_list = 1
- let g:syntastic_check_on_open = 1
- let g:syntastic_check_on_wq = 0
- " MarkdownPreview settings
- " use a custom port to start server or random for empty
- let g:mkdp_open_to_the_world = 1
- let g:mkdp_open_ip = '127.0.0.1' " change to you vps or vm ip
- let g:mkdp_port = 8889
- function! g:EchoUrl(url)
- ! echo url
- endfunction
- let g:mkdp_browserfunc = '' " 'g:EchoUrl'
- let g_mkdp_echo_preview_url = 1
- nmap <Leader>md <Plug>MarkdownPreview
- nmap <Leader>ms <Plug>MarkdownPreviewStop
- nmap <leader><Leader>m <Plug>MarkdownPreviewToggle
- " }}}
- " VIMRC {{{
- nnoremap <leader>ev :vsp $MYVIMRC<CR>
- nnoremap <leader>sv :source $MYVIMRC<CR>
- " }}}
- " vim:foldmethod=marker:foldlevel=0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement