My configuration files and tools
This is tushar's configuration repo. Feel free to use whatever you would like from it! It'd be great if you mentioned where it came from if you think it's cool.
in the end it will look like this
and here is the link for the background waifu photo, i have kept my nvim transparent, so this photo u need to add to your terminal background https://github.com/tusharxoxoxo/nvim-config-super-duper-octo-fiesta/blob/cookies/sexy-anime-girl-in-space-jtrt80grfiym6iyx.jpeg
If you like what I'm doing, consider supporting me by clicking the heart button above!
Major areas include:
Prerequisite: install ripgrep.
This area contains the configuration I want to share between machines that will go to $XDG_CONFIG_HOME
(generally, ~/.config
).
Here is a small list of shortcuts (space is my leader key)
nvim .
for opening the explorer%
to create a new filed
to create a new directory:Ex
for opening the Explorer<leader>pv
for opening the explorer:so
to source that file- a small tip for indentation:
=ap
for indenting the entire file =
After highlighting in visual mode, this will indent the highlighted portion:PackerSync
for synching packers<leader>pf
find files by typing their name<leader>ps
this opens grep find words in the entire directoryciw
delete the current word and go to insert modelua ColorMyPencils()
After doing :PackerSync the background waifu disappears, this is to bring our waifu back:TSPlaygroundToggle
A syntax tree, also known as a parse tree or abstract syntax tree (AST), is a hierarchical representation of the syntactic structure of a program or a piece of code. It illustrates how the various elements of the code relate to each other grammatically.
Harpoon shortcutscontrol e
harpoon menu<leader>a
add file to harpooncontrol h
file 1 in harpooncontrol t
file 2 in harpooncontrol n
file 3 in Harpooncontrol s
file 4 in Harpoon
21. <leader>u
undotree toggle
22. control ww
for window switch (usually control w should do the window switch, but it's just not working so ww
23. <leader>gs
manipulate inside a git repo
24. K
and J
, first highlight the text, then these two keys we can move up and down carrying the highlighted text
25. control u
for page up
26. control d
for page down
27. /something
this search something in that file
28. n
for the next occurrence of that search thing, but for that first we need to get out of searching by pressing enter, and shift n
or N
to go backwards
29. :%s/original-name/new-name/g
here %s
is for searching something, /original-name
for searching this name, /new-name
for the new name, /g
for doing this globally
30. :s/original-name/new-name/g
if we only want to change the occurence of a specific word in a single line
31. :%s/original-name/new-name
if we want to replace all the first instance of a specific word in all the lines
32. :%s#/#doom#g
if we want to replace the occurence of //
in our file then we can use a different delimiter say #
33. :s/original-name/new-name/gc
this will give u option to replace the next occurence or not, press y or n
y
: Yes; make this change.n
: No; skip this match.a
: All; make this change and all remaining ones without further confirmation.q
: Quit; don't make any more changes.l
: Last; make this change and then quit.CTRL-E
: Scroll the text one line up.CTRL-Y
: Scroll the text one line down.
:.,+5s/original-name/new-name/g
a way to change the next 5 occurence of a specific word
lsp ones
36. control p
select the previous item
37. control n
select the next item
38. control y
confirm, don't forget this one, it's important cause without this u will kinda hate lsp
39. control<leader>
complete, this one too, imp
40. gd
lsp buffer definition
41. control o
for going back from buffer to the original file
42. K
Hower
43. vws
workspace symbols
44. <leader>vd
diagnostic open float
45. [d
diagnostic goto next
46. ]d
diagnostic goto prev
47. <leader>vca
buffer code action
48. <leader>vrr
buffer references
49. <leader>vrn
buffer rename
50. control h
signature help
51. control v
then highlight the area/block u want to comment shift i
to go into insert mode at the very start of the line
//
and then press ESC or control [
52. vi"
and it will select everything within double quotes or vi(
, the best part is it will jump the cursor before the string
53. "+y
to copy into clipboard from Vim editor
"
says to use a register, +
specifies the register to use (where + means the system clipboard in this case)m y
is the yank operation
54. "+p
and "+P
paste into vim from system clipboard
55. gg"+yG
if u r in normal mode and want to select all the content on the current file, something which we usually do via cmd a
in our normal day to day browsing
56. ctrl r
to fzf zsh history
fzf ones
57. fzf
for simple searching for a file in terminal
58. fzf --preview='cat {}'
with this we can preview different files for searching for a particular file
59. nvim $(fzf --preview='cat {}')
for searching a file a then opening that file in nvim
-
diw
,diW
are a better alternative for using multiple dw (delete word),diw
will delete the word i am middle of,diW
will delete the entire thing we r inside of -
<leader>f
after installing prettier using the commandbun i --save-dev prettier
, we can using prettier format using this command for formating inside the vim in a instant
just added vim-sneak
62. s<char><char>
to search this two character combination in your entire file, and all the other additional gets lighted in beautiful pink color, which is lovely to see with naked eyes, u will be mesmerised the movement u see it
63. ;
for going to next match of that two character sequence that u just searched or u can also do s for repeat that again, but u would be done if u do so, like why in the world would u want to do that, r u dumb or what, just do ;
64. 3;
to skip to the third (3rd) match from your current
65. ctrl o
for going back to that starting position
66. s<Enter>
to repeat the last search
67. S
for searching backwards
cit
to change inside tags after deleting everthing inside those tagsdit
to delete everthing inside those tags.
this will repeat the previous command:set wrap
to wrap long lines
there r a lot more such shortcuts, but these r what coming to my mind will definitely update this list in future
Subdirectories include:
Check the nvim
folder for configuration. For more instructions, see the README there.
this page was last updated on 6 Aug 2024. please contact me if you notice it is outdated, or if you would like more recent information.