Skip to content

Instantly share code, notes, and snippets.

@spro
Last active September 30, 2023 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spro/954fdc5603cd0707955fbfb803b02f4c to your computer and use it in GitHub Desktop.
Save spro/954fdc5603cd0707955fbfb803b02f4c to your computer and use it in GitHub Desktop.
A simpler nvim setup
-- Indentation
vim.o.autoindent = true
vim.o.smarttab = true
vim.o.expandtab = true
vim.o.tabstop = 4
vim.o.shiftwidth = 4
vim.o.softtabstop = 4
vim.o.backspace = "2"
-- Searching
vim.o.gdefault = true
vim.o.laststatus = 2
vim.o.showmatch = true
vim.o.hlsearch = true
vim.o.incsearch = true
vim.o.ignorecase = true
vim.o.smartcase = true
-- Dividers & splits
vim.o.splitbelow = true
vim.o.splitright = true
-- Set leader to ","
vim.g.mapleader = ","
-- Clear search highlight with <leader><space>
vim.api.nvim_set_keymap('n', '<leader><space>', ':nohlsearch<CR>', {noremap = true, silent = true})
-- Open fzf file search with Ctrl-P
vim.api.nvim_set_keymap('n', '<C-P>', ':Files<CR>', {noremap = true, silent = true})
# Install plugins
git clone git@github.com:tpope/vim-surround.git ~/.local/share/nvim/site/pack/tpope/start/vim-surround
git clone git@github.com:tpope/vim-abolish.git ~/.local/share/nvim/site/pack/tpope/start/vim-abolish
git clone git@github.com:tpope/vim-commentary.git ~/.local/share/nvim/site/pack/tpope/start/vim-commentary
git clone git@github.com:christoomey/vim-tmux-navigator.git ~/.local/share/nvim/site/pack/christoomey/start/vim-tmux-navigator
git clone git@github.com:junegunn/fzf.git ~/.local/share/nvim/site/pack/junegunn/start/fzf
git clone git@github.com:junegunn/fzf.vim.git ~/.local/share/nvim/site/pack/junegunn/start/fzf-vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment