Skip to content

Instantly share code, notes, and snippets.

@raven-rock
Last active September 23, 2023 22:22
Show Gist options
  • Save raven-rock/d447b818e12348538c40aeb452e34d88 to your computer and use it in GitHub Desktop.
Save raven-rock/d447b818e12348538c40aeb452e34d88 to your computer and use it in GitHub Desktop.
colorscheme jellybeans
filetype plugin indent on " This does though, including ruby.
syntax on " turn on syntax hilighting
set hidden " allow hidden buffers, i.e. unsaved buffers in background
" set mouse +=a " enable mouse support in terminal -> http://stackoverflow.com/questions/2149456/reasons-for-using-command-line-vim-versus-gui-vim
" set clipboard=unnamedplus
set clipboard=unnamed " enable yanks to go to OS clipboard.
set nu " line numbers on
set ignorecase " ignore case in searches
set smartcase " ignore case if search pattern is all lowercase, case-sensitive otherwise
set nocompatible " vim only
set tabstop=4 " tab width
set shiftwidth=4 "
set softtabstop=4 "
set expandtab " tabs are spaces instead of tabs
set ruler " line, column display always on
set hlsearch " hilight last search pattern
"set cursorline " cursor line easy to see
set autoindent " always set autoindenting on
set incsearch " show search matches as you type
set laststatus=2 " always show status line
set linebreak " [Levi] cause long lines to wrap by words instead of just chars. http://stackoverflow.com/questions/13294489/make-vim-only-do-a-soft-word-wrap-not-hard-word-wrap
set noswapfile
set nobackup
"" Alternatively:
"set backupdir=~/.vim/var/backup//
"set directory=~/.vim/var/swp//
"" https://vi.stackexchange.com/questions/12794/how-to-share-config-between-vim-and-neovim
"" > To fix the colorscheme I had to set to 256 terminal color mode, i.e. add this to your .vimrc (= init.vim) file, which will be ignored by nvim:
set t_Co=256 " Note: Neovim ignores t_Co and other terminal codes.
nnoremap Y y$
let g:mapleader = ' '
nnoremap <leader>fs :w<return>
nnoremap <leader>wq :wq<return>
nnoremap <leader>qq :q<return>
nnoremap <leader>qa :qa<return>
nnoremap <leader>QQ :qa!<return>
nnoremap <leader>ww <C-w><C-w>
nnoremap <leader>wo <C-w><C-o>
nnoremap <leader>w/ :sp<return>
nnoremap <leader>w- :vs<return>
nnoremap <leader>/ :Lines<return>
nnoremap <leader>ff :Files<return>
nnoremap <leader>[ mmO<esc>`m
nnoremap <leader>] mmo<esc>`m
call plug#begin('~/.vim/var/plugged')
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-surround'
Plug 'junegunn/fzf' " , { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'simeji/winresizer'
call plug#end()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment