by vectorpush · 13y ago · 0 comments
Let's say my pwd is `/home/projects` and i want to edit `/home/projects/a_huge_sprawling_app/940j_394/lol/flight_controller.rb`
`vim **/flight_controller.rb`
opens our flight_controller.rb straight away. In terms of effort, this allows you to basically omit a `find -name` when you're in a rush to edit some damn file where the hell is it again damn we need to reevaluate this directory str...----
Double bang to re-use your last terminal entry. One great use, taking all the pain out of forgetting your sudos
`rm -rf /var/log`
rm: cannot remove `/var/log': Permission denied
`sudo !!`
All evidence of wrongdoing is now destroyed.-----
Ok, here is an awesome one for users of the ultimate cloud IDE: Vim.
In your local ~/.ssh/config:
`ForwardX11 yes`
`SendEnv WINDOWID`
In your remote server's /etc/ssh/sshd_config: `AcceptEnv WINDOWID`
In your vimrc: `set clipboard=unnamedplus`
This has the effect of seamless yank and paste between local and remote vim sessions, no need for ctrl+shift+v.I love linux.
[1]: https://www.gnu.org/software/bash/manual/bash.html#The-Shopt...
Thanks a lot for wising me up to the new hotness offered by bash 4+ (zsh is also pretty slow for me for some reason, even though people keep telling me to switch to that. Maybe I'm more impatient than most folks).