Skip to content

Instantly share code, notes, and snippets.

@mayelespino
Created March 25, 2022 04:59
Show Gist options
  • Save mayelespino/e6e8bddb0413b2bbfdc7757dc978ddfe to your computer and use it in GitHub Desktop.
Save mayelespino/e6e8bddb0413b2bbfdc7757dc978ddfe to your computer and use it in GitHub Desktop.
vimrc set-up
" URL: https://vim.wikia.com/wiki/Example_vimrc
" Authors: https://vim.wikia.com/wiki/Vim_on_Libera_Chat
" Description: A minimal, but feature rich, example .vimrc. If you are a
" newbie, basing your first .vimrc on this file is a good choice.
" If you're a more advanced user, building your own .vimrc based
" on this file is still a good idea.
"------------------------------------------------------------
" Enable syntax highlighting
if has('syntax')
syntax on
endif
" Better command-line completion
set wildmenu
" Show partial commands in the last line of the screen
set showcmd
" Allow backspacing over autoindent, line breaks and start of insert action
set backspace=indent,eol,start
" When opening a new line and no filetype-specific indenting is enabled, keep
" the same indent as the line you're currently on. Useful for READMEs, etc.
set autoindent
" Display the cursor position on the last line of the screen or in the status
" line of a window
set ruler
" Always display the status line, even if only one window is displayed
set laststatus=2
" Instead of failing a command because of unsaved changes, instead raise a
" dialogue asking if you wish to save changed files.
set confirm
" Use visual bell instead of beeping when doing something wrong
" set visualbell
" And reset the terminal code for the visual bell. If visualbell is set, and
" this line is also included, vim will neither flash nor beep. If visualbell
" is unset, this does nothing.
" set t_vb=
" Enable use of the mouse for all modes
if has('mouse')
set mouse=a
endif
" Set the command window height to 2 lines, to avoid many cases of having to
" "press <Enter> to continue"
set cmdheight=2
" Display line numbers on the left
set number
" Indentation settings for using 4 spaces instead of tabs.
" Do not change 'tabstop' from its default value of 8 with this setup.
set shiftwidth=4
set softtabstop=4
set expandtab
" Indentation settings for using hard tabs for indent. Display tabs as
" four characters wide.
"set shiftwidth=4
"set tabstop=4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment