在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):benbrastmckie/.config开源软件地址(OpenSource Url):https://github.com/benbrastmckie/.config开源编程语言(OpenSource Language):TeX 56.0%开源软件介绍(OpenSource Introduction):.configNeoVim.A complete configuration for writing LaTeX documents withThe following sections provide installation instructions for Mac, Arch, and Debian operating systems. In the CheatSheet.md you can find all of the key-bindings that I have added to NeoVim for writing LaTeX documents, where the LearningGit.md provides resources specifically geared for integrating Git into your workflow. You can also find video series which: (1) demonstrates the resulting functionality of the present configuration; (2) walks through the installation process; (3) explains how to modify the configuration for your own needs; and (4) indicates how to use Git to track changes and collaborate with others. Table of ContentsThe programs covered include: NeoVim, Git, Skim/Zathura, Zotero, Alacritty, Tmux, and Fish. I will also include information for globally remapping keys to better suit writing LaTeX documents with NeoVim. Mac OS InstallationOpen the terminal by hitting
If Homebrew is installed, it will report which version you have which you can update by means of the following:
If Homebrew has not been installed, you may install it by running the following two commands:
FishAlthough optional, I highly recommend that inexperienced users begin by installing Fish which makes working insider the terminal a little easier. Otherwise, you can skip to the next section. To install Fish, run the following commands in turn:
To delete the welcome message, run:
DependenciesCheck if Node is installed by running:
If Node is not installed, run:
Check if Python 2 and 3 are installed by running the following:
If either version of Python is missing, run:
NeoVimInstall NeoVim by entering:
Once the installation is complete, open NeoVim by entering:
To check the health of your NeoVim install, enter the following in normal-mode (enter normal-mode in NeoVim by hitting escape) in NeoVim:
If Python 3 reports an error, run following in the terminal (to exit NeoVim, write
Continue to run NeoVim comes with an extremely austere set of defaults, including no mouse support, making it difficult to use prior to configuration. In order to install plugins, extending the features included in NeoVim, run the following:
Install the FZF fuzzy finder, Ripgrep, and Pandoc by running the following commands, respectively:
GitCheck to see whether Git is already installed by entering the following:
If Git is not installed, run:
Next install LazyGit by running:
Installing the GitHub CliAssuming that you are using GitHub to host your repositories, it is convenient to install the GitHub Cli which allows you to make changes to your repositories directly from the terminal inside NeoVim:
For further information, see the section GitHub Cli in the Cheat Sheet as well as the GitHub Cli Repo. Adding an SSH Key to GitHubIf you have not already, you can also add an SSH key by amending and running the following:
Hit
Run the following to copy the SSH key to your system clipboard:
In the top right corner of your GitHub page, click Check to make sure that the SSH key is working by pushing commits up to one of your repositories (see (Git Part 2) for details). If your SSH key stops working after rebooting, run the following command:
If you get an error, retry the command above with a lowercase 'k'. Adding a Personal Access TokenCreate a personal access token (PAT) by going to GitHub.com, clicking your user icon in the top right, navigate to
You must then copy the PAT, pasting it into a temporary file saved on your computer.
Next, open a terminal and run
You can now add your PAT by navigating to a directory in which you have initiated a git repo in which a remote has already been added, opening a file in that repo by running
Repeat the steps above to run another test, entering your username and PAT as before. Run one final test, checking to see if your credentials are now automatically submitted, avoiding the need to enter your username and PAT each time you push or pull changes. For more help, see these video instructions. ConfigurationIn order to clone the configuration files into the appropriate folder on your computer, enter the following into the terminal, hitting return after each line:
If you have not already installed MacTex on your computer, you can run the following command in order to check to see if it is already installed:
To install MacTex, you can download the package here, or else run the following command:
Reboot your computer, and run NeoVim by entering the following into the terminal:
After the plugins finish installing, quite NeoVim with SkimInstall the Skim pdf viewer by running:
You will need to grant permission to open Skim by opening Mac System Settings, and approving the application in Security. In order to tell Vimtex to open Skim, run the following command in the terminal:
Once the file has opened in NeoVim, change all occurrences of 'zathura' and 'evince' to 'skim' by entering the following commands in NeoVim:
Save and quit the file by entering Open Skim, navigating to the preferences, and select "Check for file changes" as well as "Reload automatically".
In PDF-Tex support, open "Preset" and choose "Custom".
In the "Command" filed, type
Ignore any warnings for Python 2, Ruby, and Node.js. If other warnings are present, it is worth following the instructions provided by CheckHealth, or else troubleshooting the errors by Googling the associated messages as needed. ZoteroDownload and install Zotero along with the appropriate plugin for your preferred browser. Find a paper online, signing in to the journal as necessary and downloading the pdf manually. Now return to the paper on the journal's website and test the browser plugin for Zotero which should be displayed in the top right of the screen. Create the bib and bst directories, and move the .bst bibliography style files into the appropriate folder by running the following:
Download and install Better BibTex by following these instructions.
Under Nerd FontsIn order for NeoVim to load icons, it will be imporant to install a NerdFont.
For simplicity, I have included RobotoMono in
If you intend to use the stock terminal, you will need to go into the terminal's settings to change the font to RobotoMono. You are now ready to write LaTex in NeoVim inside the stock terminal. If you intend to upgrade your terminal to Alacritty with Tmux, then proceed as follows: Alacritty and TmuxRun the following in the terminal:
You will also need to move the Tmux configuration file to the appropriate location by running:
Assuming that you already installed Fish above, you will now need to locate fish on your operating system by running the following:
The command should return
Replace
When you reopen
You are now read use NeoVim in Alacritty, complete with Tmux and the Fish shell.
I highly recommend swapping the CapsLock and Esc keys by opening Arch Linux InstallationOpen the terminal and run the following commands:
Check to confirm that Python is installed:
If Python is not installed, run:
To check the health of your NeoVim install, open NeoVim by running
If Python 3 reports an error, run following in the terminal (to exit NeoVim, write
NeoVim comes with an extremely austere set of defaults, including no mouse support, making it difficult to use prior to configuration. In order to install plugins, extending the features included in NeoVim, run the following:
Install the FZF fuzzy finder, Ripgrep, and Pandoc with the following commands respectively:
GitCheck to see whether Git is already installed by entering the following:
If Git is not installed, run:
If you don't have Yay, you can install it by running the following:
If you run into errors, you may be missing the following dependency, which you can add by running:
Next, install LazyGit using Yay by running:
Installing the GitHub CliAssuming that you are using GitHub to host your repositories, it is convenient to install the GitHub Cli which allows you to make changes to your repositories directly from the terminal inside NeoVim:
You will then need to follow the instructions in order to authenticate GitHub Cli by running:
Set NeoVim as your default editor by running:
For further information, see the section GitHub Cli in the Cheat Sheet as well as the GitHub Cli Repo. Adding an SSH Key to GitHubIf you have not already, you can also add an SSH key by amending and running the following:
Hit
If you do not have
After the install, run the following to copy the SSH key to your system clipboard:
In the top right corner of your GitHub page, click ConfigurationIn order to clone the configuration files into the appropriate folder on your computer, enter the following into the terminal, hitting return after each line:
If you have not already installed LaTeX on your computer, you can run the following command in order to check to see if it is already installed:
To install LaTeX, run the following
Run NeoVim to install plugins:
After the plugins finish installing, quite NeoVim with ZathuraInstall the Zathura pdf viewer by running:
Unless you have the Evince pdf viewer installed, you may also want to set Zathura as your default pdf viewer for opening pdfs for the papers you cite via the Vimtex Context Menu. You can do so by editing the following file:
Once the file has opened in NeoVim, change all occurrences of 'evince' to 'zathura' by entering the following in NeoVim in normal-mode:
Alternatively, you could replace Zathura here with another pdf viewer of your choice, for instance, one that allows you to easily take notes and highlight the associated pdf. After reopening NeoVim, enter the following command:
Ignore any warnings for Python 2, Ruby, and Node.js. If other warnings are present, it is worth following the instructions provided by CheckHealth, or else troubleshooting the errors by Googling the associated messages as needed. ZoteroDownload and extract the Zotero tarball in ~/Downloads, and move the extracted contents and set the launcher by running the following in the terminal:
Install Better-BibTex by downloading the latest release here (click on the .xpi).
Go into
Right-click the main library folder in the left-most column, and select Nerd FontsIn order for NeoVim to load icons, it will be imporant to install a NerdFont.
For simplicity, I have included RobotoMono in
If you intend to use the stock terminal, you will need to go into the terminal's settings to change the font to RobotoMono regular. You are now ready to write LaTex in NeoVim inside the stock terminal. If you intend to upgrade your terminal to Alacritty with Tmux and the Fish shell, then proceed as follows: Alacritty, Tmux, and FishRun the following in the terminal:
You will also need to move the Tmux configuration file to the appropriate location by running:
Assuming that you installed Fish above, you will now need to locate fish on your operating system by running the following:
The command should return
Replace '/usr/bin/fish' with the location of fish if different, saving and exiting with
To delete the welcome message, run:
In order to reset Tmux, run:
When you reopen Alacritty, Fish should be the default shell inside a Tmux window. If you want to turn on the Vim keybindings within Fish, run the following:
You are now read use NeoVim in Alacritty, complete with Tmux and the Fish shell. I highly recommend swapping the CapsLock and Esc keys as detailed below for using Arch on a Macbook Pro. Debian Linux InstallationOpen the terminal and run the following commands:
Check to confirm that Python is installed:
If Python is not installed, run:
To check the health of your NeoVim install, open NeoVim by running
If Python 3 reports an error, run following in the terminal (to exit NeoVim, write
NeoVim comes with an extremely austere set of defaults, including no mouse support, making it difficult to use prior to configuration. In order to install plugins, extending the features included in NeoVim, run the following:
Install the FZF fuzzy finder, Ripgrep, and Pandoc with the following commands respectively:
GitCheck to see whether Git is already installed by entering the following:
If Git is not installed, run:
Next, install LazyGit using Launchpad by running:
|
请发表评论