You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+42-65
Original file line number
Diff line number
Diff line change
@@ -18,92 +18,67 @@ Multi-windowed editing with NerdTree and TagBar sidebars.
18
18
19
19
#### Automated Installation
20
20
21
-
Run `./install.sh`
21
+
`./install.sh`
22
22
23
-
#### Manual Installation
23
+
Automatically installs my configuration, along with dependencies into your system. Tested on Ubuntu 20.04. I highly suggest reading and understanding each line of the installation script before running it, especially if you are using other Linux distros, or macOS. For macOS, manually run the commands, and use `homebrew` instead of `apt`.
24
24
25
-
```sh
26
-
#!/bin/bash -e
25
+
#### Post Installation
27
26
28
-
# Make config directory for Neovim's init.vim
29
-
mkdir -p ~/.config/nvim
27
+
##### Download and install a Nerd Font
30
28
31
-
# Install nvim (and its dependencies: pip3, git), Python 3 and ctags (for tagbar)
Airline and devicons require a patched font, or Nerd Font in order to display properly. Run `./font_install.sh` to download and install Iosevka Term Nerd Font into your `~/.fonts` directory, or run the command manually:
Once downloaded, open your terminal's preferences and change the font to "Iosevka Term Regular". If the font is not there, your OS' font directory may not be `~/.fonts`. Find out which directory your fonts are stored in, and place the downloaded font file in that directory instead.
# (Optional but recommended) Install a nerd font for icons and a beautiful airline bar (https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts) (I'll be using Iosevka for Powerline)
It may be easier for you to type `vim` instead of `nvim` everytime you edit a file, so aliasing it could save you some trouble. Add an alias to your bashrc/zshrc/somerc or aliases file to alias nvim to vim:
49
40
50
-
# (Optional) Alias vim -> nvim
41
+
```sh
51
42
echo"alias vim='nvim'">>~/.bashrc
52
-
53
-
# Enter Neovim and install plugins using a temporary init.vim, which avoids warnings about missing colorschemes, functions, etc
54
-
sed '/call plug#end/q' init.vim >~/.config/nvim/init.vim
# Copy init.vim in current working directory to nvim's config location ...
59
-
cp init.vim ~/.config/nvim/
60
43
```
61
44
62
-
###Update
45
+
##### Fix nvim + tmux issues
63
46
64
-
Update plugins (super simple)
47
+
Running nvim within a tmux session may cause certain unwanted issues like escape key lag, or displaying wrong colors. Run `cat .tmux.conf >> ~/.tmux.conf` or manually add these to your `~/.tmux.conf` configuration file to address the issues:
65
48
66
-
```
67
-
nvim
68
-
:PlugUpdate
69
-
```
70
-
71
-
(Optional) Clean plugins - Deletes unused plugins
72
-
73
-
```
74
-
nvim
75
-
:PlugClean
49
+
```sh
50
+
set -sg escape-time 5 # fix vim esc delay
51
+
set -g default-terminal "screen-256color"# ensures vim uses right $TERM color, default is "screen"
52
+
set -ga terminal-overrides ",*256col*:Tc"# fixes vim reproducing slightly wrong colors in tmux
76
53
```
77
54
78
-
(Optional) Check, download and install the latest vim-plug
55
+
### Update
79
56
80
-
```
81
-
nvim
82
-
:PlugUpgrade
83
-
```
57
+
#### Updates from me
84
58
85
-
(Optional) Pull my updates if you want my new modifications
59
+
I occasionally update and push my new configurations here. If you want to receive the updates, you can pull the latest init.vim and replace the one you have.
86
60
87
61
```sh
88
62
git pull
89
63
cp init.vim ~/.config/nvim/
90
64
```
91
65
92
-
##Note
66
+
#### vim-plug commands for plugins
93
67
94
-
### For Non-GUI Users
68
+
Run these to install new plugins, update or delete existing plugins, or upgrade vim-plug itself.
95
69
96
-
* Colorschemes may not be rendered
97
-
* Changing fonts may be harder (https://unix.stackexchange.com/a/49823), if you do not intend to do customize your font, you should uncomment the devicons plugin within "init.vim" (`" Plug 'ryanoasis/vim-devicons'`)
70
+
* Install plugins: `:PlugInstall` in nvim
71
+
* Update plugins: `:PlugUpdate` in nvim
72
+
* Delete unused plugins: `:PlugClean` in nvim
73
+
* Update vim-plug itself: `:PlugUpgrade` in nvim
98
74
99
75
### Mapped Commands in Normal Mode
100
76
101
77
Most custom commands expand off my map leader, keeping nvim as vanilla as possible.
102
78
103
79
*`,` - Map leader, nearly all my custom mappings starts with pressing the comma key
104
-
*`,q` - Sidebar filetree viewer (NERDTree)
105
-
*`,w` - Sidebar classes, functions, variables list (TagBar)
106
-
*`\` - Toggle both NERDTree and TagBar
80
+
*`,q` or `\` - Toggle sidebar filetree viewer (NERDTree)
81
+
*`,w` or `|` - Toggle sidebar classes, functions, variables list (TagBar)
# (Optional but recommended) Install a nerd font for icons and a beautiful airline bar (https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts) (I'm using Iosevka Term Nerd Font)
4
+
echo"[*] Downloading patch font into ~/.local/share/fonts ..."
# Installs Optixal's neovim-init.vim into ~/.config/nvim/init.vim. Intended for Ubuntu/Debian. I highly recommend running the following commands manually, especially if you are running macOS or other Linux distros. For macOS, use homebrew instead of apt.
4
+
3
5
# Make config directory for Neovim's init.vim
4
6
echo'[*] Preparing Neovim config directory ...'
5
7
mkdir -p ~/.config/nvim
@@ -9,37 +11,29 @@ echo '[*] App installing Neovim and its dependencies (Python 3 and git), and dep
# (Optional but recommended) Install a nerd font for icons and a beautiful airline bar (https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts) (I'll be using Iosevka for Powerline)
27
-
echo"[*] Downloading patch font into ~/.local/share/fonts ..."
# Enter Neovim and install plugins using a temporary init.vim, which avoids warnings about missing colorschemes, functions, etc
29
+
# Enter Neovim and install plugins with vim-plug's :PlugInstall and coc extensions with CoC's :CocInstall using a temporary init.vim, which avoids warnings about missing colorschemes, functions, etc
35
30
echo -e '[*] Running :PlugInstall within nvim ...'
36
31
sed '/call plug#end/q' init.vim >~/.config/nvim/init.vim
echo -e "[+] Done, welcome to \033[1m\033[92mNeoVim\033[0m! Try it by running: nvim/vim. Want to customize it? Modify ~/.config/nvim/init.vim"
45
-
39
+
echo -e "[+] Done, welcome to your new \033[1m\033[92mNeovim\033[0m experience! Try it by running: nvim/vim. Want to customize it? Modify ~/.config/nvim/init.vim! Remember to change your terminal font to Iosevka Term Regular, or any other preferred nerd font :)"
0 commit comments