Update readme
This commit is contained in:
parent
e874755fd9
commit
3d8cf2f058
1 changed files with 46 additions and 9 deletions
55
README.md
55
README.md
|
@ -15,36 +15,66 @@ Installing system stuff (Fedora example):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo dnf install \
|
sudo dnf install \
|
||||||
|
python3-pip \
|
||||||
neovim \
|
neovim \
|
||||||
ripgrep \
|
ripgrep \
|
||||||
fd-find \
|
fd-find \
|
||||||
npm \
|
npm \
|
||||||
tree-sitter-cli \
|
tree-sitter-cli \
|
||||||
wl-clipboard \
|
wl-clipboard \
|
||||||
dejavu-fonts-all-2.37-18.fc36.noarch
|
dejavu-fonts-all \
|
||||||
|
gnu-free-mono-fonts
|
||||||
|
|
||||||
pip install \
|
pip install \
|
||||||
pynvim \
|
pynvim \
|
||||||
'python-lsp-server[all]' \
|
'python-lsp-server[all]' \
|
||||||
flake8 \
|
flake8 \
|
||||||
|
pyright
|
||||||
|
|
||||||
|
|
||||||
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
|
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
|
||||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#####
|
||||||
|
|
||||||
|
|
||||||
##### Inside vim
|
##### Inside vim
|
||||||
|
|
||||||
```
|
```
|
||||||
:PlugInstall
|
:PlugInstall
|
||||||
|
|
||||||
|
# installing packages, which mason-lspconfig cannot autoinstall (?)
|
||||||
|
:MasonInstall phpcs
|
||||||
```
|
```
|
||||||
|
|
||||||
On Fedora there is need to make sure your system can display any unicode character. Hacked fonts are needed for filetype icons but there is also need for a dedicated package with unicode fonts (like unifont-fonts.noarch) that will have every character missing from default font used in Neovim editor. Link to hacked fonts:
|
On Fedora there is need to make sure your system can display any unicode character. Hacked fonts are needed for filetype icons but there is also need for a dedicated package with unicode fonts (like unifont-fonts.noarch) that will have every character missing from default font used in Neovim editor. Link to hacked fonts:
|
||||||
[https://www.nerdfonts.com/font-downloads](https://www.nerdfonts.com/font-downloads)
|
[https://www.nerdfonts.com/font-downloads](https://www.nerdfonts.com/font-downloads)
|
||||||
|
|
||||||
|
#### General info
|
||||||
|
|
||||||
|
##### Mason:
|
||||||
|
|
||||||
|
Mason installs stuff in `.local/share/nvim/mason/packages` so they are independent from system stuff, like pip installed python packages.
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
|
##### root perms when editing
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Re-open a current file with sudo
|
||||||
|
:SudaRead
|
||||||
|
# Open /etc/sudoers with sudo
|
||||||
|
:SudaRead /etc/sudoers
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Forcedly save a current file with sudo
|
||||||
|
:SudaWrite
|
||||||
|
# Write contents to /etc/profile
|
||||||
|
:SudaWrite /etc/profile
|
||||||
|
```
|
||||||
|
|
||||||
##### Opened files navigation:
|
##### Opened files navigation:
|
||||||
|
|
||||||
<table border="1" id="bkmrk-ctrl-w-%3Carrow%3E-movin" style="border-collapse: collapse; width: 100%; height: 506.6px;"><colgroup><col style="width: 50%;"></col><col style="width: 50%;"></col></colgroup><tbody><tr style="height: 29.8px;"><td style="height: 29.8px;"><leader> m m
|
<table border="1" id="bkmrk-ctrl-w-%3Carrow%3E-movin" style="border-collapse: collapse; width: 100%; height: 506.6px;"><colgroup><col style="width: 50%;"></col><col style="width: 50%;"></col></colgroup><tbody><tr style="height: 29.8px;"><td style="height: 29.8px;"><leader> m m
|
||||||
|
@ -117,8 +147,15 @@ On Fedora there is need to make sure your system can display any unicode charact
|
||||||
|
|
||||||
##### Git stuff
|
##### Git stuff
|
||||||
|
|
||||||
<table border="1" id="bkmrk-ctrl%2Bs-show-current-" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 50%;"></col><col style="width: 50%;"></col></colgroup><tbody><tr><td>Ctrl+g
|
<table border="1" id="bkmrk-ctrl%2Bs-show-current-" style="border-collapse: collapse; width: 100%; height: 208.6px;"><colgroup><col style="width: 50%;"></col><col style="width: 50%;"></col></colgroup><tbody><tr style="height: 29.8px;"><td style="height: 29.8px;">Ctrl+g
|
||||||
</td><td>show current code chunk changes</td></tr></tbody></table>
|
</td><td style="height: 29.8px;">show current code chunk changes</td></tr><tr><td><leader>hb
|
||||||
|
</td><td>show full git blame of current line
|
||||||
|
</td></tr><tr><td><leader>hD</td><td>show splitted blame diff
|
||||||
|
</td></tr><tr><td><leader>hd</td><td>show splitted diff</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;"><leader>hr
|
||||||
|
</td><td style="height: 29.8px;">reset hunk
|
||||||
|
</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;"><leader>hR</td><td style="height: 29.8px;">reset whole buffer
|
||||||
|
</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;"><leader>td</td><td style="height: 29.8px;">toggle deleted
|
||||||
|
</td></tr></tbody></table>
|
||||||
|
|
||||||
Genreal git commands:
|
Genreal git commands:
|
||||||
|
|
||||||
|
@ -146,14 +183,16 @@ Nice single file diff viewer:
|
||||||
:Gdiffsplit
|
:Gdiffsplit
|
||||||
```
|
```
|
||||||
|
|
||||||
GitGuter provides some commands for git:
|
GitSings provides some commands for displaying git stuff:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
:GitGutter*
|
:Gitsigns *
|
||||||
|
|
||||||
#examples:
|
#examples:
|
||||||
:GitGutterUndoHunk
|
:Gitsigns toggle_word_diff
|
||||||
:GitGutterDiffOrig
|
:Gitsigns toggle_linehl
|
||||||
|
:Gitsigns toggle_numhl
|
||||||
|
:Gitsigns toggle_signs
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Code editing stuff
|
##### Code editing stuff
|
||||||
|
@ -195,5 +234,3 @@ GitGuter provides some commands for git:
|
||||||
##### Sessions
|
##### Sessions
|
||||||
|
|
||||||
To save **new** session on specific path, just use `:SaveSession`, then when opening nvim there, without arguments, the session will be restored.
|
To save **new** session on specific path, just use `:SaveSession`, then when opening nvim there, without arguments, the session will be restored.
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue