younghoogl.blogg.se

Iterm2 cheat sheet
Iterm2 cheat sheet













iterm2 cheat sheet
  1. #Iterm2 cheat sheet install
  2. #Iterm2 cheat sheet code
  3. #Iterm2 cheat sheet plus

bash # wget -O /etc/bash_completion.d/tmuxinator.bash zsh # wget -O /usr/local/share/zsh/site-functions/_tmuxinator

iterm2 cheat sheet

If you installed tmuxinator via Ruby's gem, you'll need to run the followingĬommands to put the completion files where they'll be loaded by your shell.

iterm2 cheat sheet

#Iterm2 cheat sheet install

Your distribution's package manager may install the completion files in theĪppropriate location for the completion to load automatically on startup. Your mileage may vary forĮarlier versions. The recommended version of tmux to use is 1.8 or later, with the exception of 2.5, which is not supported (see issue 536 for details). Mine looks like this: export EDITOR='vim' tmux If you want to change your default editor simply Tmuxinator uses your shell's default editor for opening files. In these cases, users should use RVM or rbenv to install a supported Ruby version and use that version's gem binary to install tmuxinator. Some operating systems may provide an unsupported version of Ruby as their "system ruby". Tmuxinator aims to be compatible with the currently maintained versions of Ruby. Some users have reported issues when installing via Homebrew, so the RubyGems installation is preferred until these are resolved. If-shell "test \"$(printf '#' if you want to see what is being tested against.Installation RubyGems gem install tmuxinator Homebrew brew install tmuxinator So I've improved upon the various approaches in different answers to this thread although complex, this approach works with both shells and other commands: # ⌃K: Clears the current pane (from ) So, I've been using plu's approach from above for a while, but I got fed-up with the limitations thereof (basically, the ⌃L passed through is meaningless unless piped to a program that understands it.) As mentioned, this approach needs to clear what's typed so the " clear. The only thing that still kinda nags at me is that the real ctrl-k without tmux doesn't have problems if you currently have something typed at the prompt and will preserve what you've typed while clearing the screen. That pretty much gives me ctrl-k with tmux. There's a great article here which gives more info on using hex codes with tmux and iTerm:

#Iterm2 cheat sheet code

I do this, by going to iTerm > Preferences > Profiles > Keys and adding a shortcut to send the hex code "0x01 0圆B". Lastly, in iTerm I set ctrl-k to map to ctrl-a k (I have my tmux prefix set to ctrl-a), so I can type ctrl-k which is what my hands want to do from so many years of doing so. Even with the trailing space mentioned above the internal history of the shell will include the " clear. The send-keys "Up" and last send-keys C-u clears out the last items from your shells internal history. The first send-keys C-u and send-keys C-k will clear whatever is currently typed at the prompt to ensure that the " clear & tmux clear-history" is successful (e.g., if you've typed "ABCDEFG" at the prompt and have your cursor between the D and the E, this ensures that "ABCD clear & tmux clear-historyEFG" is not sent to the shell, which would fail). I like to have this command not show up in my history since this is more inline with ctrl-k in the Terminal. The leading space in " clear & tmux clear-history" prevents the command from being written to the history file (providing you have your shell setup to treat leading spaces this way google "hist ignore space" + the name of your shell for more info).

#Iterm2 cheat sheet plus

I've used some of the above plus other sources to come up with: bind k send-keys C-u \ send-keys C-k \ send-keys " clear & tmux clear-history" \ send-keys "Enter" \ run-shell "sleep.















Iterm2 cheat sheet