These are my configuration files for Linux, including:
And other tools that I use sometimes:
Warning: This script is experimental. Proceed with caution.
Run the script install.sh:
git clone https://github.com/magnoelmagnifico/dotfiles
cd dotfiles
./install.shThis script will create several symbolic links from this repository to where each program expects its configuration file.
This configuration is based on kickstart.nvim.
| Mapping | Function |
|---|---|
<Leader> |
<Space> |
+ |
Cursor to end of line ($) |
- / & |
Cursor to first non-whitespace character of the line (^) |
, / _ |
Repeat search forward / backwards |
U |
Redo (<C-r>) |
jk / kj |
Exit insert mode |
<Leader>y / <Leader>Y |
Yank to system clipboard |
<Leader>p / <Leader>P |
Paste from system clipboard |
<Leader>x |
Delete current buffer |
<Leader>w |
Write current buffer to disk |
<Leader>- |
Open file explorer |
<Leader>_ |
Open file explorer in current working directory |
Windows, buffers and scroll
| Mapping | Function |
|---|---|
ñ / ; |
Window comand (<C-w>) |
<C-hjkl> |
Jump to window |
<C-n> / <C-N> |
Jump to next / previous window |
<C-.> |
Jump to last accessed window |
<C-Left> / <C-Right> |
Move between buffers |
go |
Jump to alternate file |
Comment.nvim (gc and gb):
| Mapping | Function |
|---|---|
gcc |
[C]omment/uncomment current line |
gbc |
[B]lock [C]omment/uncomment current line |
gc<TextObject> |
[C]omment/uncomment region linewise |
gb<TextObject> |
[C]omment/uncomment region blockwise |
gco |
Insert comment to the next line |
gcO |
Insert comment to the previous line |
gcA |
Insert comment to end of the current line |
mini.surround:
| Mapping | Function |
|---|---|
sa |
Add surrounding |
sr |
Replace surrounding |
sd |
Delete surrounding |
sf |
Find surrounding |
sh |
Highlight surrounding |
These need to be combined with a motion like w, ip, etc. It also adds the
n command which matches the next surrounding. They are also dot-repeatable.
Surroundings:
":Helloto"Hello"':Helloto'Hello', and other characters.{,(,[and<:Helloto{ Hello }},),]and>:Helloto{Hello}tand enter tag:Helloto<p>Hello</p>fand enter name:Hellotofunction(Hello)?: interactive
Telescope (<Leader>s - [S]earch):
| Mapping | Function |
|---|---|
<Leader>f |
Search [F]iles |
<Leader>g |
[G]rep files |
<Leader>/ |
Grep current buffer |
<Leader>s. |
Repeat last [S]earch |
<Leader>st |
[S]earch [T]elescope pickers |
<Leader>so |
[S]earch [O]ld files |
<Leader>sg |
[S]earch [G]it files |
<Leader>sw |
[S]earch current [W]ord |
<Leader>sb |
[S]earch [B]uffers |
<Leader>sd |
[S]earch [D]iagnostics |
<Leader>sh |
[S]earch [H]elp |
<Leader>sk |
[S]earch [K]eymaps |
<Leader>sm |
[S]earch [M]aps |
<Leader>sr |
[S]earch [R]egisters |
<Leader>sr |
[S]earch [R]egisters |
<Leader>s/ |
Grep open files |
<Leader>sc |
[S]earch [C]onfig files |
LSP (<Leader>l - [L]SP):
| Mapping | Function |
|---|---|
[d / ]d |
Go to previous / next [D]iagnostic |
K |
Hover documentation for symbol under cursor |
gl |
Open diagnostic in floating window ([G]o [L]SP) |
gq |
Open diagnostics in a quickfix window ([G]o [Q]uickfix) |
gd |
[G]o to [D]efinition |
gD |
[G]o to [D]eclaration (header file) |
gI |
[G]o to [I]mplementation |
gr |
[G]o to [R]eferences under cursor |
<Leader>lt |
[T]ype Definition |
<Leader>ll |
[L]ist diagnostics in a Telescope window |
<Leader>ld |
[D]ocument Symbols |
<Leader>lw |
[W]orkspace Symbols |
<Leader>lr |
[R]ename |
<Leader>la |
Code [A]ction |
<Leader>li |
Toggle [I]nlay Hints |
<Leader>lf |
Show [F]unction signature |
LSP complete (nvim-cmp):
| Mapping | Function |
|---|---|
i_<C-Space> |
Start complete menu |
i_<C-u> / i_<C-d> |
Scroll completion docs ([U]p and [D]own) |
i_<Enter> |
Confirm completion |
i_<C-h> / i_<C-l> |
Select next item / go to next field in snippet |
Debugging with DAP (<Leader>d - [D]ebug):
| Mapping | Function |
|---|---|
<F9> / <F10> |
Start / Finish |
<F11> |
Toggle UI |
<F1> |
Step into function call |
<F2> |
Step over to the next sentence |
<F3> |
Step out of function |
<F4> |
Run to cursor |
<F5> |
Step back (step into reversed) |
<F6> |
Reverse continue until breakpoint |
<Leader>db |
Toggle [b]reakpoint |
<Leader>dB |
Create conditional [b]reakpoint |
<Leader>dl |
Set [l]og breakpoint |
<Leader>dq |
List breakpoints |
<Leader>dd |
Remove all the breakpoints |
<Leader>dh |
[H]over expression |
<Leader>dj |
[J]ump to current frame |
<Leader>dc |
Open interactive [c]onsole |
Managers:
:Mason: Manage LSP servers:Lazy: Manage plugins:ConformInfo: Manage formatters
Others:
:WhichKey:Neogit(or<Leader>G)
Tabs:
| Mapping | Function |
|---|---|
Alt-t |
New tab |
Alt-w |
Close tab |
Alt-1 ... 9 |
Select tab |
Alt-[ / Alt-] |
Switch tab |
Alt-{ / Alt-} |
Move tabs |
Alt-. |
Last tab |
Panes:
| Mapping | Function |
|---|---|
Alt-v |
Split [v]ertically |
Alt-b |
Split horizontally |
Alt-x |
Close pane |
Alt-z / Alt-Enter |
Toggle [z]oom |
Alt-hjkl / Alt-Arrows |
Switch pane |
Alt-s |
[S]elect pane |
Alt-m |
[M]ove panes clockwise |
Alt-S |
[S]wap two panes |
Alt-T |
Send pane to new [T]ab |
Resize pane mode:
| Mapping | Function |
|---|---|
Alt-r |
Init resize mode |
hjkl |
Resize pane |
Arrows |
Resize pane with more control |
Escape / Enter |
Exit resize mode |
Search mode:
| Mapping | Function |
|---|---|
Alt-f |
Init search mode |
Enter / Ctrl-p / UpArrow |
Search previous |
Ctrl-n / DownArrow |
Search next |
Ctrl-r |
Change search mode (Case sensitive - Case insensitive - [R]egex) |
Ctrl-u |
Clear pattern |
Escape / Ctrl-c |
Exit search mode |
Copy mode:
Alt-c: Init [c]opy mode- WezTerm defaults
- Vim-like movement
- Copy with
yand exit
Other:
| Mapping | Function |
|---|---|
Ctrl-V / Ctrl-C |
Regular copy and paste |
Shift-PageUp / Shift-PageDown |
Scroll line by line |
Ctrl-PageUp / Ctrl-PageDown |
Scroll quickly |
Alt-p |
Open command [p]alette |
Alt-d |
Open [d]ebug tab |
Alt-L |
Clear scrollback (like Ctrl-l) |
Alt-R |
[R]eload config |
Alt-P |
Open [P]ython interactive console |
Ctrl-+-0 |
Resize font |