Skip to content

Instantly share code, notes, and snippets.

@Kaiepi
Created October 12, 2018 16:52
Show Gist options
  • Save Kaiepi/feb44445dcdbcf49a116727621678c65 to your computer and use it in GitHub Desktop.
Save Kaiepi/feb44445dcdbcf49a116727621678c65 to your computer and use it in GitHub Desktop.
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/vundle.vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'scrooloose/nerdtree'
Plugin 'tomasr/molokai'
Plugin 'pangloss/vim-javascript'
Plugin 'jelera/vim-javascript-syntax'
Plugin 'vim-perl/vim-perl'
Plugin 'vim-perl/vim-perl6'
Plugin 'junegunn/vim-easy-align'
call vundle#end()
set autoread
filetype on
filetype plugin on
filetype indent on
syntax enable
set background=dark
try
colorscheme molokai
catch
endtry
set guifont=Inconsolata\ 10
if &termencoding == ""
let &termencoding = &encoding
endif
set encoding=utf-8
setglobal fileencoding=utf-8
set fileencodings=utf-8,latin1
set ffs=unix,mac,dos
set ignorecase
set smartcase
set noerrorbells
set novisualbell
set t_vb=
set tm=500
set backspace=2
set mouse=a
set noexpandtab
set smarttab
set shiftwidth=4
set tabstop=4
set softtabstop=4
set ruler
set number
autocmd BufRead,BufNewFile *.js setfiletype javascript
autocmd BufRead,BufNewFile *.jsx setfiletype javascript
autocmd BufRead,BufNewFile *.pl6 setfiletype perl6
autocmd BufRead,BufNewFile *.pm6 setfiletype perl6
autocmd BufRead,BufNewFile *.p6 setfiletype perl6
autocmd BufRead,BufNewFile *.t setfiletype perl6
autocmd BufRead,BufNewFile *.pod6 setfiletype perl6
autocmd BufRead,BufNewFile *.py setfiletype python
autocmd filetype python set shiftwidth=4 tabstop=4 softtabstop=4 expandtab
autocmd BufRead,BufNewFile *.c setfiletype c
autocmd BufRead,BufNewFile *.h setfiletype c
autocmd filetype c set shiftwidth=4 tabstop=4 softtabstop=4 expandtab
autocmd BufRead,BufNewFile *.json setfiletype json
autocmd Filetype json set shiftwidth=4 tabstop=4 softtabstop=4 noexpandtab
autocmd BufRead,BufNewFile *.yml setfiletype yaml
autocmd FileType yaml set shiftwidth=2 tabstop=2 softtabstop=2 expandtab
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
let g:easy_align_ignore_unmatched = 0
let g:easy_align_delimiters = {
\ 's': {
\ 'pattern': '\(\$\|@\|&\|%\|\\|\*\)',
\ 'left_margin': 1,
\ 'right_margin': 0,
\ 'stick_to_left': 0,
\ 'stick_to_right': 0,
\ 'ignore_groups': ['String', 'Comment'],
\ },
\ '-': {
\ 'pattern': '-',
\ 'left_margin': 0,
\ 'right_margin': 0,
\ 'stick_to_left': 0,
\ },
\ 't': {
\ 'pattern': '\(is\|unless\|does\|will\|has\)',
\ 'left_margin': 1,
\ 'right_margin': 1,
\ 'stick_to_left': 0,
\ 'stick_to_right': 0,
\ 'ignore_groups': ['String', 'Comment'],
\ }
\}
map <C-n> :NERDTreeToggle<CR>
" vipga=
xmap ga <Plug>(EasyAlign)
" gaip=
nmap ga <Plug>(EasyAlign)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment