vim
Vim and Neovim setup: vimtex with Zathura, Neo-tree, packer.nvim and vim-plug.
1 min read
References
vimtex + Zathura
brew install macvimbrew tap zegervdv/zathurabrew install zathura --with-synctexbrew install zathura-pdf-popplerMake sure to follow the zathura-pdf-poppler caveat about symlinking it to zathura’s plugin directory.
brew install mactex-no-guiInstall 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
" https://github.com/junegunn/vim-plug" Specify a directory for pluginscall 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 systemcall plug#end()neovim, Neo-tree.nvim
Install neovim:
brew install neovimUsing packer.nvim
Install packager:
git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvimAdd Neo-tree to your configuration:
Open your Neovim config file (usually located at ~/.config/nvim/init.lua for Lua):
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:
:PackerSyncConfigure Neo-tree:
require("neo-tree").setup({ -- your configuration here})Using vim-plug
Install vim-plug:
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vimAdd Neo-tree to your configuration:
Open your Neovim config file (usually located at ~/.config/nvim/init.vim for vimscript or init.lua for Lua).
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 iconsPlug 'MunifTanjim/nui.nvim'call plug#end()Install the plugin:
:PlugInstallConfigure Neo-tree:
require("neo-tree").setup({ -- your configuration here})Using Neo-tree
:Neotree toggle