Skip to content

Instantly share code, notes, and snippets.

@braynm
Last active March 18, 2019 08:19
Show Gist options
  • Save braynm/9d5eb094397d5254f50d6024eef7e826 to your computer and use it in GitHub Desktop.
Save braynm/9d5eb094397d5254f50d6024eef7e826 to your computer and use it in GitHub Desktop.
vim .vimrc configuration
syntax enable
set tabstop=2
set number
set expandtab
set softtabstop=2
set shiftwidth=2
set cursorline
set showmatch
set autoindent
set smartindent
syntax on
filetype off
set rtp+=~/.fzf
set rtp+=~/.vim/bundle/Vundle.vim
set foldmethod=syntax
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'junegunn/fzf'
Plugin 'junegunn/fzf.vim'
Plugin 'elixir-lang/vim-elixir'
Plugin 'scrooloose/nerdtree'
Plugin 'skammer/vim-css-color'
"" Plugin 'alvan/vim-closetag'
Plugin 'gregsexton/MatchTag'
Plugin 'tpope/vim-fugitive'
Plugin 'vim-erlang/vim-erlang-runtime'
"Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'majutsushi/tagbar'
Plugin 'slashmili/alchemist.vim'
Plugin 'morhetz/gruvbox'
Plugin 'airblade/vim-gitgutter'
Plugin 'ntpeters/vim-better-whitespace'
Plugin 'udalov/kotlin-vim'
Plugin 'tiagofumo/vim-nerdtree-syntax-highlight'
Plugin 'ElmCast/elm-vim'
Plugin 'neovimhaskell/haskell-vim'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'tpope/vim-surround'
Plugin 'mhinz/vim-mix-format'
Plugin 'w0rp/ale'
Plugin 'scrooloose/nerdcommenter'
Plugin 'easymotion/vim-easymotion'
Plugin 'pangloss/vim-javascript'
Plugin 'moll/vim-node'
Plugin 'isRuslan/vim-es6'
Plugin 'othree/yajs.vim'
Plugin 'mxw/vim-jsx'
Plugin 'maxmellon/vim-jsx-pretty'
call vundle#end() " required
filetype plugin indent on " required
colorscheme badwolf
filetype plugin on
set omnifunc=syntaxcomplete#Complete
set autoread
""if $COLORTERM == 'gnome-terminal'
"" set t_Co=256
""endif
set t_Co=256
set gfn=Monaco:h12
nmap <silent> <C-D> :NERDTreeToggle<CR>
""" map for switching window in NERDTree
nmap <Tab> <C-w>w
""" map for resizing window in NERDTree
nmap 7 :vertical res-5<CR>
nmap 8 :vertical res+5<CR>
nmap 9 :res-5<CR>
nmap 0 :res+5<CR>
"" Toggles the NERDTree and put the cursor to current opened file
map <leader>f :NERDTreeFind<CR>
nmap gb <C-^><CR>
"" map for fzf search
nmap <C-p> :GFiles<CR>
""set encoding=utf8
""set encoding=utf8
let NERDTreeShowHidden=1
let g:mix_format_on_save=1
"" " filetypes like xml, xhtml, ...
" This will make the list of non-closing tags self-closing in the specified files.
" ALE Config for eslint
let g:ale_javascript_eslint_executable = 'eslint'
let g:ale_linters = {
\ 'javascript': ['eslint'],
\ 'jsx': ['eslint'],
\ 'elixir': []
\}
let g:ale_fixers = { 'javascript': ['eslint'] }
let g:ale_fix_on_save = 1
let g:ale_sign_error = 'x'
"" Moving lines vertically
" Normal mode
nnoremap <C-j> :m .+1<CR>==
nnoremap <C-k> :m .-2<CR>==
" Insert mode
inoremap <C-j> :m .+1<CR>==
inoremap <C-k> :m .-2<CR>==
" Visual mode
vnoremap <C-j> :m '>+1<CR>gv=gv
vnoremap <C-k> :m '<-2<CR>gv=gv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment