Skip to content

Instantly share code, notes, and snippets.

@19WAS85
Last active December 11, 2023 20:55
Show Gist options
  • Save 19WAS85/7594037 to your computer and use it in GitHub Desktop.
Save 19WAS85/7594037 to your computer and use it in GitHub Desktop.
~/.config/nvim/init.vim
" buffers
map <Tab> :bn!<CR>
map <S-Tab> :bp!<CR>
map <S-q> :bw<CR>
" search
map <C-k> :noh<CR>
" disable page up down
map <PageUp> <nop>
map <PageDown> <nop>
imap <PageUp> <nop>
imap <PageDown> <nop>
" disable visual mouse
set mouse=
" commands
:command! Trailing :%s/\s\+$//

How To Use?

1. Download

curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
curl https://gist.githubusercontent.com/19WAS85/7594037/raw/d49210f3ff722d5254276e50f805a218715dfa87/2.init.vim > ~/.vimrc

In case of nvim, change this last command output file path from ~/.vimrc to ~/.config/nvim/init.vim.

2. Install

vim
:PlugInstall
set nocompatible
filetype off
" plugins
" https://github.com/junegunn/vim-plug
call plug#begin()
Plug 'dracula/vim', { 'as': 'dracula' }
call plug#end()
" editor
syntax on
filetype plugin indent on
let mapleader=','
set noswapfile
set modelines=0
set number
set ruler
set noerrorbells
set visualbell
set encoding=utf-8
set cc=80
set tabstop=2
set shiftwidth=2
set softtabstop=0
set smartindent
set expandtab
set noshiftround
set scrolloff=3
set backspace=indent,eol,start
set matchpairs+=<:>
set hidden
set ttyfast
set laststatus=2
set showmode
set showcmd
set autoread
au CursorHold,CursorHoldI * checktime
au FocusGained,BufEnter * :checktime
" search
set hlsearch
set incsearch
set ignorecase
set smartcase
set showmatch
map <leader><space> :let @/=''<cr> " clear search
" buffers
map <Tab> :bn!<CR>
map <S-Tab> :bp!<CR>
map <S-q> :bw<CR>
" search
map <C-k> :noh<CR>
" disable page up down
map <PageUp> <nop>
map <PageDown> <nop>
imap <PageUp> <nop>
imap <PageDown> <nop>
" disable visual mouse
set mouse=
" colors
set t_Co=256
syntax enable
set termguicolors
set background=dark
colorscheme dracula
" commands
:command! Trailing :%s/\s\+$//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment