Skip to content

Instantly share code, notes, and snippets.

@amirgon
Last active December 13, 2019 00:51
Show Gist options
  • Save amirgon/6a6b915caeb1dcb5f4c6 to your computer and use it in GitHub Desktop.
Save amirgon/6a6b915caeb1dcb5f4c6 to your computer and use it in GitHub Desktop.

List of plugins

Consider adding to .vimrc:

  • Automatically set :make directory as current buffer dir or the one above it:
    let &makeprg = 'if [ -f Makefile ]; then make -C %:p:h $*; else make -C %:p:h/.. $*; fi'
  • Highlight search: set hlsearch

.vimrc

" Vim auto-generate ctags
" https://stackoverflow.com/q/155449/619493

"au! BufWritePost * 
"au BufWritePost * silent! !ctags -R &

colorscheme torte
"
" https://stackoverflow.com/a/65122/619493
" 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment