You can set the iTerm2 title/tab bar to an arbitrary color using their proprietary escape codes. I threw together some quick bash functions for changing the colors. Here's a link to the repo.
Just the little things that make a terminal more friendly to use. Split panes, history of pasted text, customizable window/text colors, and triggers (regex matching of output) have really helped my productivity. More info about iTerm2's features here: https://www.iterm2.com/features.html
How does this compare to iTerm's image support? I suppose I don't understand why this requires a special image format — iTerm just prefixes a base64-encoded bitstream with a magic ansi sequence that allows it to interpret the bitstream as an image.
It depends on your OS, and your terminal configuration. E.g. in iTerm2 you need to set "meta sends ESC". https://www.iterm2.com/faq.html
alt (AKA meta) mappings are a complete non-issue in Nvim, they work by default and require no extra configuration in your vimrc. Just use <A-
prefix in your mappings.
nnoremap <A-f> :echom "pressed alt-f"<CR>
For me personally, I use a Mac because:
1) At a halfway-point between Linux and Windows, because of gorgeous GUI + awesome Unix base. Also iTerm.
2) A lot of really high-quality graphic design and development apps are only available for Mac. (Sketch comes to mind right away.)
3) The only keyboard that fucking works.
4) Because it's the thing that Apple designed back when Steve Jobs was around, so it's great, and it's remained great precisely because Apple forgot about it and didn't absolutely fuck it like they did with the iPhone. Of course the newest Macs are kinda shit, but I still use the MBPs, and they're still available and to my knowledge will still be updated.
tmux can do this. You would set up your a tmux session with the shell screens you wanted (and tmux can have more than one terminal window panes). Then when you're done, instead of closing the terminal, you disconnect from the tmux session. Then when you want to have those terminal windows open again, you just reconnect to the session, and it's like you never left.
tmux works in the macOS Terminal app or any other Unix shell, but requires a few key commands to be memorised and has a bit of a learning curve. iTerm2 has tmux integration and feels much more like a macOS app to use.
Info about the screenshot :
iterm2 has a paste slowly option.
Edit > Paste Slowly
"Paste Slowly" pastes the current string in the clipboard, but it doesn't send the whole string at once. It is sent in batches of 16 bytes with a 125ms delay between batches. These values can be tweaked with hidden settings. For example:
defaults write com.googlecode.iterm2 SlowPasteBytesPerCall -int 16
defaults write com.googlecode.iterm2 SlowPasteDelayBetweenCalls -float 0.125
If you want to change the colors of current directory, see this.
If you mean the small blue triangle on the left, that's not displayed by Powerlevel10k. It's iTerm2 Shell Integration Indicator. Many users turn them off. You can do that via iTerm2 -> Profile -> Terminal -> Show mark indicators.
https://www.iterm2.com/features.html
Look at mouseless copy
Basically you can do a crtl+f (to open the find) type in part of the string you want to copy, use TAB to select more of the text, then option+enter will paste it.
It's amazingly fast if you are dealing with Kubernetes.
A typical workflow would be
kubectl get po
then type out your next command like
kubectl exec -it
use the "find" to select the pod name, option+enter to paste it
So in development you end up using the terminal A LOT (probably like 10-20% of the time while you work) for different things like compiling, running tests, version control, etc. cause a ton of developer tools don’t have a UI but are terminal based only. While I love the default terminal app, these third party apps have extra features that make your time in the terminal easier or more pleasant, like nice themes, command highlighting, clipboard history, output search, etc. Look at iTerm 2’s features for example, it has a lot of stuff the default terminal doesn’t do that can save time
This isn't really a noob question about Ruby so much as about programming on a PC. If you're running OSX (mac) try this program, which is a replacement for the standard OSX terminal program:
And while you don't NEED this program, it is certainly more versatile than the standard Terminal, which you can also use.
Hint: you will need to be in the directory that you have saved whatever *.rb file you were working on in SublimeText.
As a software engineer, you should learn UNIX. Terminal is essential for me (although there are people that prefer the alternative iTerm, but I'd say play with Terminal first).
Sublime Text 3 (paid, but with lifetime free trial) or Atom (free) are great code editors.
Try Mendeley, it's the best free citations manager in my opinion. I actually prefer Papers, but Mendeley is a nice free alternative.
Another thing you should get used to are trackpad gestures, Spotlight (cmd+space) and using the Help menu to write the command you are looking for in an app (it's faster than looking for it in the menus). Also, Spotlight allows you to do search the your local files and the web, define words and perform calculations and unit conversions (including time and currency).
You want iTerm2. It provides all the usual Putty features like using the mouse through SSH and is generally better than the OSX Terminal in every way.
If you're looking for a full GUI for ssh, don't. They are all shit.
Do yourself a favor, install and use iTerm 2 rather than the default mac OS terminal.
It offers the exact same functionalities and lots of others.
Also you could look into oh-my-zsh to replace bash. At least, the completion feature should help you learn faster.
I hope it's not too advanced for you yet. Good luck!
I am going to be different and tell you: the Mac is the most amazing programmer's machine there is.
First of all, if you use a keyboard, you'll love Mac's keyboard. It allows you to have Ctrl-C independent of Cmd-C, so your "stop that" command is different from your "copy that" command, and your "make a visual column" command is different from "paste that" command. That alone is worth a lot.
iTerm2 blows every known terminal emulator out of water. Seriously, check the screencasts. It's like a love child of urxvt and tmux, but actually made in the 21st century. Friends of mine have bought Macs just to be able to run iTerm2 in full screen all day and manage their Linux boxes from there.
You get a pretty decent UNIX environment out of the box. You can install latest bash
(zsh
master race here) or gnu coreutils
with brew
. It even places things outside of /bin
so you actually never need to sudo
for any reason whatsoever.
The support for multiple monitors with different DPI depth is years above what Linux and Windows can offer.
There's still that "but but but proprietary" stuff you can do nothing to change, but that's primarily in your head.
I use the iTerm2 nightly builds, which has borderless built in. I can post a screen shot in just a little bit.
Under style in the nightly settings you can set "no title bar."
You probably need to look at whatever iterm-level variables there or or look in to how to use the iterm cli integration package to get the current directory surfaced to triggers.
https://www.iterm2.com/documentation-scripting-fundamentals.html
Thanks for this; you were on the money!
​
Using iTerm2 I had to set the right option key to `Esc+` instead of the default setting of `normal`. Further info here if anyone stumbles across this in the future: How do I make the option/alt key act like Meta or send escape codes?
​
Thanks again and have a great day!
Oh. I am using a beta version of iterm 2 which has a theme mode called minimal. It basically makes the title bar the same color as your theme similar to how hyper.js terminal looks https://www.iterm2.com/3.3/documentation-preferences-appearance.html
I mean... this is so specific to your language, CI, test framework etc.
In my case, I use https://github.com/buildkite/capybara-inline-screenshot because my CI service (Buildkite — which is amazing btw) also supports rendering those screenshots inline.
Details on the ANSI codes that iTerm uses: https://www.iterm2.com/documentation-images.html
Use iTerm 2 - https://www.iterm2.com
From there, you can create a profile and use ANSI-based (or Latin1) text mode for the game.
If you're feeling really adventurous, download WINE https://www.winehq.org and then download a Tradewars helper (like SWATH).
iTerm2 has an image protocol. Might be worth supporting this (especially since it’s trivial) instead of rendering undecipherable ASCII art blobs for embedded images.
This is specific to iTerm as far as I know. The option can be found under Preferences > Profiles > Window > Style. From that drop down menu, choose "No title bar."
Hope that helps!
If you do vim ~/.bash_profile
do you see these lines?
export NVM_DIR=~/.nvm source ~/.nvm/nvm.sh
It is possible that the install didn't add them correctly, if they aren't there you should add them. Pretty sure that when you type /bin/bash
it starts a new bash instance using .bashrc
while the osx terminal typically runs as a login shell rather than non-login. You may also want to check if your ~/.bash_profile
hassource ~/.profil
e.
For what it is worth, I an many people I work with, use iTerm2 instead of the default terminal app. You can use Oh My Zsh along with it and get some nice shortcuts and themes. They are both free btw.
Launcher https://qsapp.com/ Better Terminal https://www.iterm2.com/ MacPorts or Homebrew ( bake it yourself ).
Though for the same money, a ThinkPad may be heavier, but have better RAM/CPU, or a Dell XPS 13 perhaps?
His point is that nothing about using MacOS on a day-to-day basis will cause you to learn about Unix. You can use it to do so, but it's too easy to avoid.
Also, I use a Mac on a daily basis, mostly in the command line, and I haven't touched Terminal.app in forever. iTerm2 is so much better. Maybe Terminal's not the piece of crap it once was. (That said, even then, it was ten times better than the shit that Windows provides as a terminal.)
> iterm shitkids decided to abuse the standards to create escape codes to automatically download and open files
wat. You can't be possibly serious.
> https://iterm2.com/documentation-escape-codes.html
> https://www.iterm2.com/documentation-images.html
Holy shit. Well at least it's just going to be another hipster fuckwad with his MacBook Air covered in Rust and Node.js stickers that's getting pwned and not me.
I think the application is libcaca.
Grab a terminal, install xcode (I forget if it's available by default on mac) and (home)Brew and get to compiling.
If you want a Mac based bit of software, I use iTerm2 (https://www.iterm2.com). Pretty much every configuration is possible. Then I usually use screen inside the terminals themselves, just incase the client drops out..some love screen, some hate it, but it works for me! (tmux is also a good option!). I just have all of the connections setup as profiles in the tool belt window, and connect using the ssh key, nice and simple.
If you want a specific SFTP Mac Client, I've only ever used Forklift (Available from your friendly local Appstore!)
I'd also suggest using SSH Keys rather than passwords.
One way is using the "script" command
http://man7.org/linux/man-pages/man1/script.1.html
Some terminal programs also have options for stuff like this. The base OS X terminal allows you to save the output, but doesn't automate it.
iTerm2 for OS X does some impressive stuff like the Instant Replay feature here: https://www.iterm2.com/features.html
That's fair. I use both OSes at work. I primarily use OS X because it works better for what kind of work I do, but I am not totally against Windows.
Windows has gotten a lot better, but there are bugs there too.
And do you mean installing Xen between the hardware and OS X? I get why running a microkernel hypervisor on a server can be necessary, but why on a MBP? And aren't guest OSes in Xen generally accessed via SSH/VNC? If you're running high-uptime services that require stuff like live-migration, a laptop isn't your best bet.
I was a pretty die hard Linux on my workstation kind of guy until I switched jobs and had to use a MBP. I had been using Linux Mint for quite a while and it was really hard for me to switch to OSX. The keyboard shortcuts are all different, window management and workflows had to be different. I kept fighting it and tried to bend OSX to behave more like Mint/Cinnamon, but eventually I gave in and now I think it's probably better than any Linux distro.
Now I have a hackintosh at home and sadly will probably never return to using Linux as my main OS, but most definitely will never be returning to Windows.
I spend 90% of my time in terminals, so I don't need much to keep me happy, just good window management via keyboard shortcuts. However, as an iphone user, having the messages app, notes, photo integration, and all of that seamlessly integrated is a huge bonus.
Also, I probably don't even need to say it, but you cannot buy better hardware in a laptop. Best touchpad by lightyears, top end battery life, as well as the best webcam and mic. Best of all it will run 3 monitors at the same time, plus the laptop display allowing you to have up to 4 displays at once.
Here are a few must haves:
Well, I know you put in an edit "for Windows", but for others:
Linux: terminator (should be available on most distros)
Mac: iTerm2 https://www.iterm2.com/
Unfortunately, I didn't stumble across any other alternatives on Windows when I was doing my search (btw, I blame /u/bmcgahan for showing me the features of SecureCRT that made me switch from my old terminal apps to the two I mention above).
Googling and clicking around brought me to: https://code.google.com/p/qutty/
Have you seen it? Tried it?
I don't really do much on Windows these days, and definitely not anything that I need a terminal for.
Makes perfect sense!
Well, in that case screw the VM, you've got a perfectly good terminal right in front of you.
Bash is the "language" (for lack of better description) that is the OS X default shell. If you want to gain a bit of knowledge on the how and why's of the language I recommend this tutorial. I learned most of my initial Bash scripting from the two tldp guides. Once you get comfortable with Bash, and its limitations, and if you find you really like scripting, you'll probably naturally progress to perl, python, or ruby (which are all more "advanced" languages).
That said, in order to script you first need to understand how to move around. Check out this tutorial for some basics on the linux command line. It's geared toward Linux, but because both Linux and Darwin (OS X's backbone) default to Bash almost all of the commands will be identical. I recommend starting here.
In case you are not already aware, you can access the command line from OS X's default terminal client (Located at Applications -> Utilities -> Terminal). If you find it to be a bit cumbersome (there are no bells and whistles really) download iTerm 2. Both will provide identical access to your machine, so it's purely a matter of preference.
It's a bit challenging to come up with ideas on your first learning projects (I had the blessing of being pushed by work requirements; more specifically sys admin "quality of life" type things) but if you poke around a bit and have any questions don't hesitate to kick me a PM.
Edit: As an aside, I am oversimplifying a few concepts (for example, what the shell is). That said, it should at least point you in the right direction and you can learn more when you know the right questions to ask.
This might help:
https://www.iterm2.com/documentation-tmux-integration.html
Personally, I've never gotten tmux -CC
to work with iTerm2. It complains about aggressive-resize
being on, even though I'm pretty sure I'd turned it off.
That said, you can already use tmux to manage several sessions/windows/panes, so one need not insist on using iTerm2's tabs. For example, you can create a new window using <Prefix>-c
.
Just look here
She’ll integration was super cool, as well as conditional text highlights. Local tmux was nice as well. I was able to even automating testing of T1 circuits. It has support for AppleScript, which I never used.
The other suggestion I have, if you have not done so already, is upgrade your terminal to something like https://www.iterm2.com/
It has some very nice theme support built into it that works regardless of what shell you're using.
In order to raise a (macOS) iTerm2
window's focus (for an existing nvim
opened filed), is there a way to get something like nvr --remote-send
to work in combination with an iTerm2 hotkey?
The hard(er) part seems to be getting this to work with a file that's not already nvim
-opened.
There is a description of the feature on this page: https://www.iterm2.com/features.html
By hitting "Cmd-Return" I'm able to bring up a full screen terminal that I use for quick administrative tasks.
MAC USERS:
While you're at I would also encourage you to look into iTerm2 - the better terminal.
Might as well get a new terminal to match that new shell :)
iTerm is great because it has tabs.
iTerm2’s UI can integrate with tmux. Split panes aren’t emulated with text, scrollbars work and show how far back the scrollback buffer goes, and sessions are reflected by iTerm2 windows or tabs.
This: https://www.iterm2.com/documentation-tmux-integration.html
iTerm2's tmux integration solves these problems.
When you run "tmux -CC", a new tmux session is created. An iTerm2 window opens and it acts like a normal iTerm2 window. The difference is that when iTerm2 quits or the ssh session is lost, tmux keeps running. You can return to the host you were ssh'ed into and run "tmux -CC attach" and the iTerm2 windows will reopen in the same state they were in before. A few use cases come to mind:
This basically: https://www.iterm2.com/documentation-tmux-integration.html
iTerm2's tmux integration solves these problems.
When you run "tmux -CC", a new tmux session is created. An iTerm2 window opens and it acts like a normal iTerm2 window. The difference is that when iTerm2 quits or the ssh session is lost, tmux keeps running. You can return to the host you were ssh'ed into and run "tmux -CC attach" and the iTerm2 windows will reopen in the same state they were in before. A few use cases come to mind:
Go back to that other thing about Apple's default terminal program and "marks" that's not working on your OS X version: I think there's a third-party terminal program for OS X that also has the same feature. I think it was this here:
Have a look at the features iterm has to offer: https://www.iterm2.com/features.html There might be few missing in the default terminal app. I guess it depends on whether you need it or not.
It's possible to have a split view in the default terminal app on macOS. Just hit cmd+d. Terminator doesn't really work on macOS ( or at least it was a pain in the ass in the past ) so i suggest you take a look at iTerm2. Does most things terminator can do...
I have an update here. I tried running tmux as you mentioned. the problem was again tmux scrollback buffer(I wanted it to be as native as terminal) and I started searching for better scrollback experience using tmux and found these articles
here second article mentions one of iterm2 settings "Save lines to scrollback when an app status bar is present"
> When this setting is enabled, lines scrolled off the top of the screen in the presence of a status bar are added to the scrollback buffer. The screen is considered to have a status bar if it has a scroll region whose top is the first line of the screen and whose bottom is above the bottom of the screen.
which is exactly above piece of code was doing
tput csr 0 $(($LINES - 3))
so above script works well when this setting is enabled
Thanks a lot. I wouldn't have find it if you wouldn't have suggested this approach :) Now I can have true tmux like status bar without using tmux
I used to patch the iTerm title bar as well, but I found out that their nightly builds have a stock option to remove the title bar! I haven't run into any stability issues either.
There's also EternalTCP with tmux's control mode.. alas there's ony iTerm2 that really has support for tmux CC mode.
That gives you a setup like mosh but with the ability to use multiple terminal windows.
> it should be not as advanced as iTerm2.
First and foremost my preference is linux, but if i must work on windows i prefer consoleZ (cuz ligatures look pretty).
Secondly you are correct, out-of-the-box it doesn't have all the features of iTerm2, however the main reason for using it (xterm256 colors) is there, and the rest can be configured.
Thirdly i would also argue that both iTerm2 (and all other terminal-ems) are taking on features that shouldn't be their responsibility in the first place and i wouldn't rely on them anyway (i.e. i'd configure my own non-integrated solutions).
Since you think iTerm2 is the most advanced (in terms of features), lets examine it shall we? From the top :
https://www.iterm2.com/features.html
These features are irrelevant and should be the responsibility of a tiling window manager + workspaces
Available with Zshell + grep
As themeing / aesthetics, you wont beat Zshell + oh-my-zsh (powerline or agnoster).
Scriptable.
Thanks very much! I realised I had installed iterm2 integration when I ssh'd in from my mac.
I disabled it and it doesn't show the text. I don't use it very much so I will probably just keep it disabled. I can source the file when I ssh in if needed. Thanks!
I've been using this BetterTouchTool for quite a while and just found out it works as a window manager tool also. So here's my first jab at it.
>If you don't mind me asking, what does iTerm2 offer that Terminal doesn't?
To list a few that I use:
The tmux integration is actually something of a killer feature for me. tmux
is a shell session manager, and it's a great way to have a persistent remote session over ssh that survives disconnects. The problem is that tmux has it's own idea of tabs and panes and requires a completely different set of keybindings to learn to operate.
But not with iTerm2! The tmux integration means it can replicate the tmux panes and panels in the local UI, enabling seamless persistent remote and local sessions.
In general, you cannot use tiles in your terminal. Tiles are bitmap images, and those wont display like that in terminals usually (the newest iterm2 can do it though, for example). vt_tiledata doesn't include tiles itself, it just tells the display program which tiles to use. So you'd have to either use a GUI like ebonhack , or try to do some dirty hacking with aforementioned iterm2 capabilities. EDIT: BTW, the web terminal just reads the vt_tiledata, then uses CSS to lay an image over the tile.
Konsole is supremely buggy. Terminology (which is what I use on Linux) is also buggy as well as being difficult to configure. gnome-terminal is clunky and lacking in features for someone like myself that needs to interact with dozens of terminals. For the basics, iTerm doesn't crash and whoa, configuration changes actually stick around.
This is where people start getting all defensive but I don't care because I'm not trying to convince anyone and I'm sure as fuck not going back until Linux has a terminal emulator that sucks less so I don't need to be convinced the other way.
If you're curious about features, you can read those here.
Yes, xterm is the X11 terminal. But even that I dont use OSX (I use elementary OS) I think there is a way to run X11 apps but I dont recommend using xterm over something like iterm. I heard that the version 3 comes with a full true color support.
So even that I dont have config for iterm, as far as I know, iterm is the best terminal for OSX.
> What the actual fuck did Apple do to Terminal?
This probably isn't a problem with Terminal. It's some kind of weird issue with either your character/font encoding, your keyboard, or both.
If you use a program like iTerm2 (which you should honestly be using instead of Terminal.app anyway), do you still see the problem?
Don't need the borderless patch any more if you just grab the latest beta release, lots of other nifty features in there too. I've been using it for weeks without any issues.
For OSX I suggest using iTerm2 as it can be configured to be usable with bash (unlike the default Terminal application). In iTerm2, you can adjust the scrollback buffer by going
Preferences... -> Profiles -> Terminal -> Scrollback Buffer
On OSX Iterm2 kicks ass, it shares a lot of the same terminal splitting features as terminator. When I'm working in OSX I'm using Iterm2, when I'm working in Linux, I'm using terminator.
I use iTerm2 (version 2.1.1) on OS X. In addition, the MotD function causes the game to freeze in iTerm2 (both work fine in the Apple Terminal application). The documentation can be found here.
Also, http://trac.nethack4.org/ is saying that I am forbidden from using it (I "don't have permission to access / on this server").
Doch PageUp / PageDown gibt es wenn Du eine Tastatur mit Nummernfeld hast. Die Alternative auf einem MacBook ist IMHO Fn+Up / Fn+Down. Musst Du mal ausprobieren - ich hab aus gutem Grund eine große Tastatur. ;-)
Die Konsole ist Geschmacksache. Wenn Du Sie verwendest, dann denk dran, dass PageUp und PageDown im Buffer scrollt. Das kann z.B. im Vim nervig sein. Die IMHO einfachste Lösung ist iTerm 2 zu benutzen. Das ist das, was ich getan habe.
Willkommen auf der dunklen Seite der Macht. xD
You probably know this, but iTerm has a visor mode like TotalTerminal, plus a bunch of other features.
What terminal emulator are you using? I was using pry on mac os x(I'm now doing development in a debian VM because I prefer linux) and had no issues. I was using rails 4.2 ruby 2.1.5 and the terminal emulator inside emacs (Technically the ansi-term package). If you are using the stock iterm, try iterm2(which is better in every way anyway IMHO).