Skip to main content
vim
June 12, 2022

References

vimtex + Zathura

1
2
3
4
brew install macvim
brew tap zegervdv/zathura
brew install zathura --with-synctex
brew install zathura-pdf-poppler

Make sure to follow the zathura-pdf-poppler caveat about symlinking it to zathura’s plugin directory.

1
brew install mactex-no-gui

Install vim-plug. Add the call plug#begin(~/.vim/plugged') and call plug#end() lines to your .vimrc as recommended in the README.

Install VimTeX using vim-plug as your plugin manager. Check out my .vimrc code below.

Reload .vimrc and run :PlugInstall in vim to perform installation

~/.vimrc
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
" https://github.com/junegunn/vim-plug
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')

Plug 'lervag/vimtex'
    let g:tex_flavor='latex'
    let g:vimtex_view_method='zathura'
    let g:vimtex_quickfix_mode=0
    " these two lines are for a separate plugin I use: https://github.com/KeitaNakamura/tex-conceal.vim
    set conceallevel=1
    let g:tex_conceal='abdmg'

" Initialize plugin system
call plug#end()

neovim, Neo-tree.nvim

Install neovim:

1
brew install neovim

Using packer.nvim

Install packager:

1
git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim

Add Neo-tree to your configuration:

Open your Neovim config file (usually located at ~/.config/nvim/init.lua for Lua):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
require('packer').startup(function()
    use {
        "nvim-neo-tree/neo-tree.nvim",
        branch = "v3.x",
        requires = { 
            "nvim-lua/plenary.nvim",
            "nvim-tree/nvim-web-devicons", -- optional, for file icons
            "MunifTanjim/nui.nvim",
        }
    }
end)

Install the plugin:

1
:PackerSync

Configure Neo-tree:

1
2
3
require("neo-tree").setup({
    -- your configuration here
})

Using vim-plug

Install vim-plug:

1
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Add Neo-tree to your configuration:

Open your Neovim config file (usually located at ~/.config/nvim/init.vim for vimscript or init.lua for Lua).

1
2
3
4
5
6
call plug#begin('~/.local/share/nvim/plugged')
Plug 'nvim-neo-tree/neo-tree.nvim', { 'branch': 'v3.x' }
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-tree/nvim-web-devicons' " optional, for file icons
Plug 'MunifTanjim/nui.nvim'
call plug#end()

Install the plugin:

1
:PlugInstall

Configure Neo-tree:

1
2
3
require("neo-tree").setup({
    -- your configuration here
})

Using Neo-tree

1
:Neotree toggle