Skip to content

Instantly share code, notes, and snippets.

@filipemenezes
Last active September 15, 2022 18:52
Show Gist options
  • Save filipemenezes/cb4f49c3e40b18063226cae03ede01e8 to your computer and use it in GitHub Desktop.
Save filipemenezes/cb4f49c3e40b18063226cae03ede01e8 to your computer and use it in GitHub Desktop.
My neovim setup
:call plug#begin('~/.vim/plugged')
Plug 'morhetz/gruvbox'
call plug#end()
" ------------------------------- General settings
set nocompatible
set encoding=utf-8
syntax on
colorscheme gruvbox
let mapleader=','
" Enable mouse support
se mouse=a
" Enable filetype plugins
filetype on
filetype plugin indent on
" Hightlight column
set colorcolumn=100
" Show matches while typing search pattern
set incsearch
" Ignorecase while search
set ignorecase
" Remove swapfile (backup)
set nobackup
set nowb
set noswapfile
" Disable unnecessary redraw
set lazyredraw
" Show number of line
set number
" Always show current position
set ruler
" Show commands completion in bottom menu
set wildmenu
set autoread
" Enable cursorline
set cursorline
" Use system clipboard by default
set clipboard=unnamedplus
" Don't wrap lines
set nowrap
" Always show statusline
set laststatus=2
" Keep at least 3 lines above/below when scrolling
set scrolloff=5
" ------------------------------- Tab setup
" Tab size in spaces
set tabstop=2
" Tab size in spaces used for >>, << commands
set shiftwidth=2
" Colonum number when hit Tab in insert mode
set softtabstop=2
" Replace tabs with spaces
set expandtab
" Remove spaces like tabs
set smarttab
" Enable automatic indentation
set smartindent
" Automatically indent next line
set autoindent
" Round indent to multiple of 'shiftwidth'
set shiftround
" ------------------------------- Binds
" Ctrl-S (save current file)
imap <silent> <C-s> <C-O>:update<CR>
nmap <silent> <C-s> :update<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment