Skip to content

Instantly share code, notes, and snippets.

@tomcam
Last active September 5, 2018 06:23
Show Gist options
  • Save tomcam/5e9f93d560226bdecabf00ca7c5c558a to your computer and use it in GitHub Desktop.
Save tomcam/5e9f93d560226bdecabf00ca7c5c558a to your computer and use it in GitHub Desktop.
Neovim/nvim notes
.vimrc equivalent is $HOME/.config/nvim/init.vim
MacOS location of init.vim
$HOME/.config/nvim/
So:
# Create the directory
mkdir -p $HOME/.config/nvim/
# Edit or create the file
nvim $HOME/.config/nvim/init.vim
Windows location of init.vim
The nvim version of .vimrc is named init.vim and goes in this directory:
%LOCALAPPDATA%\nvim
So for example you'd edit init.vim in Windows like this:
C:\> nvim %LOCALAPPDATA%\nvim\init.vim
Pasting from the System clipboard
Windows: Make sure you have this in init.vim, then paste using Shift+Insert
" Windows: Paste with <Shift> + <Insert>
imap <S-Insert> <C-R>*
" My init.vim
" Enable shift-insert to paste from system Clipboard (for Windows)
imap <S-Insert> <C-R>*
" Pressing jk is same as pressing Esc
imap jk <esc>
" Make search case insenstivie
set ignorecase
" But if capitals are used in search, make it case sensitive
set smartcase
" Show current filename in title?
set title
" Color scheme.
" Favorites are blue,evening, murphy, pablo, peachpuff, slate
colorscheme blue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment