Skip to content

Instantly share code, notes, and snippets.

@iKlotho
Last active September 11, 2019 06:48
Show Gist options
  • Save iKlotho/2b22d5aff8b35faeee90cfd009307c59 to your computer and use it in GitHub Desktop.
Save iKlotho/2b22d5aff8b35faeee90cfd009307c59 to your computer and use it in GitHub Desktop.
my vimrc
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
"disable hjkl
noremap <Right> <NOP>
"disable hjkl
"
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'git://git.wincent.com/command-t.git'
"-------------------=== Code/Project navigation ===-------------
Plugin 'scrooloose/nerdtree' " Project and file navigation
Plugin 'majutsushi/tagbar' " Class/module browser
Plugin 'kien/ctrlp.vim' " Fast transitions on project files
Plugin 'takac/vim-hardtime'
Plugin 'vim-airline/vim-airline-themes' " Themes for airline
Plugin 'Lokaltog/powerline' " Powerline fonts plugin
Plugin 'fisadev/FixedTaskList.vim' " Pending tasks list
Plugin 'rosenfeld/conque-term' " Consoles as buffers
Plugin 'tpope/vim-surround' " Parentheses, brackets, quotes, XML tags, and more
Plugin 'flazz/vim-colorschemes' " Colorschemes
Plugin 'mattn/emmet-vim'
Plugin 'morhetz/gruvbox'
"Plugin 'Valloric/YouCompleteMe'
Plugin 'webdevel/tabulous'
Plugin 'pangloss/vim-javascript'
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
"Plugin 'tmhedberg/SimpylFold'
Plugin 'dense-analysis/ale'
call vundle#end() " required
filetype plugin indent on " required
colorscheme gruvbox
"colorscheme spacegray
set bg=dark
syntax on
filetype indent on
set pastetoggle=<F2>
set smartindent
set shiftwidth=4
set expandtab
set tabstop=4
set smarttab
autocmd Filetype javascript setlocal ts=2 sw=2 sts=0 expandtab
set hidden
set history=100
set number
set ruler
set ttyfast
set showcmd
set clipboard=unnamed
set wildmenu " visual autocpmlpete for command menu
set lazyredraw
set showmatch " highlight match
set autoindent
set nowrap
" configure expanding of tabs for various file types
au BufRead,BufNewFile *.py set expandtab
au BufRead,BufNewFile *.c set noexpandtab
au BufRead,BufNewFile *.h set noexpandtab
au BufRead,BufNewFile Makefile* set noexpandtab
" --------------------------------------------------------------------------------
" configure editor with tabs and nice stuff...
" --------------------------------------------------------------------------------
set expandtab " enter spaces when tab is pressed
set textwidth=120 " break lines when line length increases
set tabstop=4 " use 4 spaces to represent tab
set softtabstop=4
set shiftwidth=4 " number of spaces to use for auto indent
set autoindent " copy indent from current line when starting a new line
" make backspaces more powerfull
set backspace=indent,eol,start
set ruler " show line and column number
syntax on " syntax highlighting
set showcmd " show (partial) command in status line
"set relativenumber
nnoremap B ^
nnoremap E $
set backup
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set backupskip=/tmp/*,/private/tmp/*
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set writebackup
" silly me
"
:command WQ wq
:command Wq wq
:command W w
:command Q q
""
let g:ale_lint_on_text_changed = 'never'
let g:ale_lint_on_enter = 0
highlight ALEWarning ctermbg=DarkMagenta
nnoremap <C-t> :tabnew<CR>
let mapleader = ","
" NerdTree
map <leader>b :NERDTreeToggle<CR>
augroup numbertoggle
autocmd!
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
augroup END
"git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
"
" filenames like *.xml, *.html, *.xhtml, ...
" These are the file extensions where this plugin is enabled.
"
let g:closetag_filenames = '*.html,*.xhtml,*.phtml'
" filenames like *.xml, *.xhtml, ...
" This will make the list of non-closing tags self-closing in the specified files.
"
let g:closetag_xhtml_filenames = '*.xhtml,*.jsx'
" filetypes like xml, html, xhtml, ...
" These are the file types where this plugin is enabled.
"
let g:closetag_filetypes = 'html,xhtml,phtml'
" filenames like *.xml, *.xhtml, ...
" This will make the list of non-closing tags self-closing in the specified files.
"
let g:closetag_xhtml_filenames = '*.xhtml,*.jsx'
" filetypes like xml, html, xhtml, ...
" These are the file types where this plugin is enabled.
"
let g:closetag_filetypes = 'html,xhtml,phtml'
" filetypes like xml, xhtml, ...
" This will make the list of non-closing tags self-closing in the specified files.
"
let g:closetag_xhtml_filetypes = 'xhtml,jsx'
" integer value [0|1]
" This will make the list of non-closing tags case-sensitive (e.g. `<Link>` will be closed while `<link>` won't.)
"
let g:closetag_emptyTags_caseSensitive = 1
" Shortcut for closing tags, default is '>'
"
let g:closetag_shortcut = '>'
" Add > at current position without closing the current tag, default is ''
"
let g:closetag_close_shortcut = '<leader>>'
let g:user_emmet_leader_key=','
" js
"
let g:javascript_plugin_jsdoc=1
let g:jsx_ext_required = 0
" ---------------------------------- "
" Configure Ultisnip and YouCompleteMe
" ---------------------------------- "
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
" ----
" YCM
" ---
" let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file
" let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure
" let g:ycm_complete_in_comments = 1 " Completion in comments
" let g:ycm_complete_in_strings = 1 " Completion in string
"
" let g:ycm_key_list_select_completion = ['<C-j>', '<Down>']
" let g:ycm_key_list_previous_completion = ['<C-k>', '<Up>']
" Goto definition with F3
" map <F3> :YcmCompleter GoTo<CR>
" python
" xnoremap <leader>p :w !/home/klotho/.virtualenvs/nlp/bin/python3<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment