![]() ![]() ![]() This is because when coding you need to call ctrl very frequently. I recommend changing the Tmux prefix to Ctrl-a.Moreover, it is a lot easier/quicker given the caps-lock key aligns with the default position of your fingers in the keyboard. Here is what you need to add in your ~/.nf file to change the prefix to Ctrl-a: Once the Ctrl key has been set to the caps-lock key, it gets a lot easier/quicker to call Ctrl-a instead of Ctrl-b, because the new prefix keys are very close to each other on the keyboard. This way, once you have added a new change to the ~/.nf file, just press ctrl-b R to reload your configuration without having to open a new Tmux session. ![]() Quick note: the screenshot shown here may differ slightly from what you see by default when you install Tmux. This is because I modified the status bar. I encourage you to give it a try and see if you like it.If you want to do the same follow the steps on the “ Pimp your Tmux bar” section of this post. This post summarizes my experience using its tmux integration and compares it to my existing workflow. ITerm2 is a fantastic product, it has a ton of features that you might not even know you need, I am a really new user and have not discovered all the ways that it can help my workflow yet. With iTerm2, I lose the tmux status bar, and the nice colors I have set up. My development environment is pretty sparse, there is not much eye candy around, but I do have a tmux status bar that is customized with colors that matches a Vim status bar scheme I like. Whereas when I was using plain tmux, the attachment is almost instant. With multiple tmux windows open, I find that iTerm2 takes some time to spawn all the tabs - I can see each tab being started one at a time. When I start my day I attach to the existing session that is running on the server. I initially thought that this would help with repetitive strains, since now I have to use a different key, Cmd, instead of relying on Ctrl for all my actions, but the context switch actually forced me to be more aware if I was working in a vim split or tmux pane. With iTerm2, this workflow doesn’t work anymore, I have to use to switch between tmux panes. For my workflow, I have a tmux split with vim above, and shell below (for running builds and tests). I use vim-tmux-navigator for easy navigation between tmux panes and vim splits, this means that (by default it’s ) will jump down the vim split below the active split, or the tmux pane below the active pane. The best I could come up with was to use the Meta key. I wanted this in tmux natively, but found that it didn’t have a way to recognize the Cmd key. With tmux you need, and since is usually two keys, it’s effectively 3 keys. The tab strip in iTerm2 has tab numbers so it’s easy to hop to. I can probably come up with key chord to condense prefix+[ and ? to a single chord, but iTerm2 is still easier. Right now to do this in Tmux I hit prefix+[, then ? to search upwards, then visually highlight my selection to copy. ITerm2 mouseless copy, where you hit Tab while searching for a term, and the search term expands, then you can copy the term easily. With plain tmux, you can enable tmux mouse support and this lets you drag to resize panes, but you can’t do that to reorder windows, you’ll need to use a command for that. Seamless integration with iTerm2 tabs and panes means using mouse to easily drag and rearrange stuff. This integration even works for running tmux onto a host that I ssh to! I tried this workflow out for a couple of weeks, and eventually decided to switch back (to using a single iTerm2 window, ssh, and start tmux on my ssh destination). This means that tmux panes become iTerm2 panes, and tmux windows become iTerm2 tabs. I recently tried out iTerm2 (mostly for its integration for URLs, but it has a ton of other features). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |