2020-06-26 12:19:50 +00:00
|
|
|
" Activate Pathogen:
|
|
|
|
execute pathogen#helptags()
|
|
|
|
execute pathogen#infect()
|
|
|
|
|
|
|
|
syntax on
|
|
|
|
filetype plugin indent on
|
|
|
|
|
|
|
|
" Make comma the leader key
|
|
|
|
:let mapleader=","
|
|
|
|
|
|
|
|
set shiftwidth=2
|
|
|
|
set shiftround
|
|
|
|
set tabstop=2
|
|
|
|
set expandtab
|
|
|
|
set smarttab
|
|
|
|
set encoding=utf-8
|
|
|
|
set nocompatible
|
|
|
|
set t_Co=256
|
2020-07-30 12:51:44 +00:00
|
|
|
set background=dark
|
2020-06-26 12:19:50 +00:00
|
|
|
set hidden
|
|
|
|
set history=100
|
|
|
|
set nowrap
|
|
|
|
set smartindent
|
|
|
|
set copyindent
|
|
|
|
set autoindent
|
|
|
|
set hlsearch
|
|
|
|
set showmatch
|
|
|
|
set wildignore+=*.log,*.sql,*.cache
|
|
|
|
set number
|
|
|
|
set relativenumber
|
|
|
|
set ruler
|
|
|
|
set backspace=indent,eol,start
|
|
|
|
set ignorecase
|
|
|
|
set smartcase
|
|
|
|
set incsearch
|
|
|
|
set history=1000
|
|
|
|
set undolevels=1000
|
|
|
|
set title
|
|
|
|
set novisualbell
|
|
|
|
set noerrorbells
|
|
|
|
set nobackup
|
|
|
|
set noswapfile
|
|
|
|
set clipboard=unnamed
|
|
|
|
set pastetoggle=<F2>
|
|
|
|
set mouse=a
|
|
|
|
set lazyredraw
|
|
|
|
|
|
|
|
" Colour scheme:
|
|
|
|
colorscheme PaperColor
|
|
|
|
|
|
|
|
" Key mappings:
|
|
|
|
nnoremap j gj
|
|
|
|
nnoremap k gk
|
|
|
|
nmap <silent> ,/ :nohlsearch<CR>
|
|
|
|
map <up> <nop>
|
|
|
|
map <down> <nop>
|
|
|
|
map <left> <nop>
|
|
|
|
map <right> <nop>
|
|
|
|
" Select just-pasted text:
|
|
|
|
nnoremap <Leader>p `[v`]
|
|
|
|
nnoremap Q @@
|
|
|
|
|
|
|
|
" Markdown configuration:
|
|
|
|
autocmd FileType markdown setlocal wrap linebreak
|
|
|
|
|
|
|
|
" Nerdtree configuration:
|
|
|
|
map <Leader>n :NERDTreeToggle<CR>
|
|
|
|
|
|
|
|
" Command-T configuration:
|
|
|
|
map <leader>f :CommandTFlush<CR>
|
|
|
|
let g:CommandTFileScanner="git"
|
|
|
|
let g:CommandTGitScanSubmodules=1
|
|
|
|
let g:CommandTGitIncludeUntracked=1
|
|
|
|
let g:CommandTMatchWindowAtTop=0
|
|
|
|
let g:CommandTMaxHeight=30
|
|
|
|
|
|
|
|
" Lightline configuration:
|
|
|
|
set laststatus=2
|
|
|
|
|
|
|
|
" Prettier configuration:
|
|
|
|
nmap <Leader>P <Plug>(Prettier)
|
|
|
|
let g:prettier#autoformat = 0
|
|
|
|
autocmd BufWritePre *.js,*.json,*.css,*.scss,*.less,*.graphql Prettier
|
|
|
|
|
|
|
|
" vim-rust configuration:
|
|
|
|
let g:rustfmt_autosave = 1
|
|
|
|
|
|
|
|
" vim-go configuration:
|
|
|
|
let g:go_fmt_command = "goimports"
|
2020-10-19 07:18:09 +00:00
|
|
|
autocmd BufNewFile,BufRead *.gohtml set syntax=gohtmltmpl
|
2020-07-12 16:01:02 +00:00
|
|
|
|
2020-06-26 12:19:50 +00:00
|
|
|
" vim-rails configuration:
|
|
|
|
let g:rails_projections = {
|
|
|
|
\ 'app/decorators/*.rb': { 'command': 'decorator' },
|
|
|
|
\ 'app/validators/*.rb': { 'command': 'validator' },
|
|
|
|
\ 'app/services/*.rb': { 'command': 'service' }
|
|
|
|
\ }
|