And albeit with a little more effort, open the changed files in the editor (it defaults to changes window). View which files are changed in what commit. Here you can check out the history of a branch. A very useful tool for preventing your colleagues from requesting changes on your pull requests just for a code style error. Reformats your code according to what you have setup in your code style settings ( PhpStorm → Preferences → Editor → Code Style → ). Can be used to select a word, a statement or variable, a line, a function or a class and so on. Pressing it repeatedly, increases the scope in which code is selected. Selects, or extends, the selection of text in your editor. Or press the return key directly for the previous file. Select by typing the name of the file or moving up and down with arrow keys. Note: Most of these instructions assume you're working with OSX. This is an ever-growing list feel free to add to it! Here's a few things you could do or learn to make your life a bit easier when it comes to software development. Can chain off of iTerm2’s search feature.Development productivity: tips and tricks.y to yank/copy the selection (also exits copy mode).Basic Vim keybinding, many keystrokes can active different actions.The following is a quick summary of copy mode: I highly recommend giving it a shot the next time you reach for your mouse. Copy mode, in my opinion, is the superior of the two approaches for mouseless copying. I highly recommend reading the documentation on iTerm2’s copy mode as it completely covers the keyboard shortcuts and features. It is important to note that the session within the pane will stop updating when you enter copy mode. It is a mode very much like Vim’s insert and normal modes. This iTerm2 mode attempts to emulate as much of the tmux copy mode as possible, allowing you to make text selections using the keyboard. Use esc to exit search, and now you have the selection in your clipboard.When your search term is selected, use cmd+c to copy the selection.Although it moves to the previous search result if one exists.Use shift+tab to expand your search to the previous word.Use tab to expand your search to the next word.Navigate until you are on the desired location.Use shift+enter to move to the previous search result.Use enter to move to the next search result.The following is a summary of this approach: I find it difficult to get right, as you cannot really afford any mistakes. To be honest, I don’t use this search copying approach very often. In addition, I found the shift+tab command cycled the selected search result, leading to some confusion. It works in a pinch, but if you mess up the amount of text in your selection, you basically have to restart the process. It is an interesting approach, to say the least:Įssentially, you initiate the search with cmd+f and you can use the enter and tab to move your selection around and to control how much of the text you want in your selection. So one approach to copying anything within the iTerm2’s session is to use the default search. We will cover others two in the sections that follow. The first one we’re not interested in as it’s the standard way to select and copy text. You can use the find feature’s “mouseless copy” feature.The big gain I was missing from tmux was the famed copy mode.Ī quick snippet from iTerm2’s documentation of highlights for text selection: To be honest, I don’t really need the session keeping functionality that tmux or screen provided. For the most part, I am able to use iTerm2 to open tabs, split panes and navigate around. One optimization within my terminal that I have been avoiding is tmux – it is unnecessarily complicated for what I need. In addition, I use BetterSnapTool for MacOS, which allows me to move/resize windows around solely from my keyboard. I have taken such a liking to the Vim keyboard-bindings that I even use Vimium (a Google Chrome extension) for keyboard-driven navigation in my browser (for as much as I can). I heavily use Vim while editing which allows for keyboard navigation. Where possible, I try to avoid using the mouse.
0 Comments
Leave a Reply. |