Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "General editor settings
- set tabstop=4
- set nocompatible
- set shiftwidth=4
- set expandtab
- set autoindent
- set smartindent
- set ruler
- set showcmd
- set incsearch
- set shellslash
- set number
- set relativenumber
- set cino+=L0
- syntax on
- filetype indent on
- filetype off
- setlocal indentkeys-=:
- "Theme (requires Solarized Light terminal theme to work properly)
- let g:solarized_termcolors=256
- set background=light
- colorscheme solarized
- "keybindings for { completion, "jk" for escape, ctrl-a to select all
- inoremap {<CR> {<CR>}<Esc>O
- inoremap {} {}
- imap jk <Esc>
- map <C-a> <esc>ggVG<CR>
- set belloff=all
- "Append template to new C++ files
- autocmd BufNewFile *.cpp 0r /home/jayleeds/vimcp/Library/Template.cpp
- "Compile and run
- "Note that this line requires the build.sh script!
- autocmd filetype cpp nnoremap <F9> :w <bar> !build.sh %:r <CR>
- autocmd filetype cpp nnoremap <F10> :!./%:r<CR>
- "LaTeX settings
- autocmd FileType tex :NoMatchParen
- autocmd FileType tex :set tw=110
- "Plugin setup
- set rtp+=~/.vim/bundle/Vundle.vim
- call vundle#begin()
- Plugin 'VundleVim/Vundle.vim'
- Plugin 'lervag/vimtex'
- Plugin 'octol/vim-cpp-enhanced-highlight'
- call vundle#end()
- filetype plugin indent on
- let g:vimtex_view_general_viewer = 'SumatraPDF'
- let g:vimtex_view_general_options = '-reuse-instance @pdf'
- let g:vimtex_view_general_options_latexmk = '-reuse-instance'
- let g:tex_flavor = 'latex'
- let g:vimtex_motion_matchparen = 0
- let g:vimtex_fold_manual = 1
- let g:vimtex_matchparen_enabled = 0
- "Clipboard configuration
- let s:clip = '/mnt/c/Windows/System32/clip.exe' " change this path according to your mount point
- if executable(s:clip)
- augroup WSLYank
- autocmd!
- autocmd TextYankPost * if v:event.operator ==# 'y' | call system(s:clip, @0) | endif
- augroup END
- endif
- au BufNewFile,BufRead *.tex
- \ set nocursorline |
- \ set nornu |
- \ set number |
- \ let g:loaded_matchparen=1 |
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement