LukeSmithxyz / voidrice

My dotfiles (deployed by LARBS)
GNU General Public License v3.0
4.26k stars 1.21k forks source link

[Question] What are shortcuts.vim #1178

Closed TheYellowArchitect closed 1 year ago

TheYellowArchitect commented 2 years ago

I finished installing LARBS, had no issues, except at the very end with the vim plugins, it said sth about can't open file /home/<username>/.config/<something about neovim> I wish I saw the full line, but it closed too fast.

LARBS works perfectly, vim too. But I went in that folder, and I found a bizzare file, where vim somehow redirects to other folder locations (shortcuts.vim)

cmap ;cac /home/<username>/.cache
cmap ;cf /home/<username>/.config
cmap ;D /home/<username>/Downloads
cmap ;d /home/<username>/Documents
cmap ;dt /home/<username>/.local/share
cmap ;rr /home/<username>/.local/src
cmap ;h /home/<username>
cmap ;m /home/<username>/Music
cmap ;mn /mnt
cmap ;pp /home/<username>Pictures
cmap ;sc /home/<username>/.local/bin
cmap ;src /home/<username>/.local/src
cmap ;vv /home/<username>/Videos
cmap ;bf /home/<username>/.config/shell/bm-files
cmap ;bd /home/<username>/.config/shell/bm-dirs
cmap ;cfx /home/<username>/.config/x11/xresources
cmap ;cfb ~/.local/src/dwmblocks/config.h
cmap ;cfv /home/<username>/.config/nvim/init.vim
cmap ;cfz /home/<username>/.config/zsh/.zshrc
cmap ;cfa /home/<username>/.config/shell/aliasrc
cmap ;cfp /home/<username>/.config/shell/profile
cmap ;cfm /home/<username>/.config/mutt/muttrc
cmap ;cfn /home/<username>/.config/newsboat/config
cmap ;cfu /home/<username>/.config/newsboat/urls
cmap ;cfmb /home/<username>/.config/ncmpcpp/bindings
cmap ;cfmc /home/<username>/.config/ncmpcpp/config
cmap ;cfl /home/<username>/.config/lf/lfrc
cmap ;cfL /home/<username>/.config/lf/scope
cmap ;cfX /home/<username>/.config/sxiv/exec/key-handler

I am a newbie at vim and linux, so my question is pretty much, how to activate the above shortcuts?

The only relevant thing I found is that cmap is for command-line vim, but no idea where that is or how to trigger the above shortcuts

cv1618 commented 2 years ago

Those are his zsh shell shortcuts, I'm not really sure what they do in neovim. When you type those shortcuts in st, d for example, it cd's you into documents and lists the contents of the directory and h takes you back to your home directory. cfz opens .zshrc in neovim.

pineapples5972 commented 2 years ago

Those are his zsh shell shortcuts, I'm not really sure what they do in neovim. When you type those shortcuts in st, d for example, it cd's you into documents and lists the contents of the directory and h takes you back to your home directory. cfz opens .zshrc in neovim.

Yes, Is there any other way to use shortcuts in shell like lua or some other way?

cv1618 commented 2 years ago

You can edit the zsh shell shortcuts to whatever bindings you want or make new ones in ~/.config/shell/shortcutsrc

jakubreron commented 1 year ago

When you launch VIM, try to type :e ;D and enter VIM will switch to the following directory and that's the purpose of this file, you basically have your ZSH bookmarks in VIM and can do some commands with it :vs ;sc, :sp ;dt, etc...

TheYellowArchitect commented 1 year ago

When you launch VIM, try to type :e ;D and enter VIM will switch to the following directory and that's the purpose of this file, you basically have your ZSH bookmarks in VIM and can do some commands with it :vs ;sc, :sp ;dt, etc...

Wow, that's insane. I was looking for a way to have multiple "tabs" like Notepad++ on Windows (my old setup for writing non-code) This solves this pretty much, yet I found it out of pure curiosity (weird error on LARBS formatting)

Thank you for explaining this to me, I will change the shortcuts straight to my .txts so I can swap text files with just a few keypresses. feelsgoodman.jpg