4 ms·
Column mode becomes helpful any time you have a few lines of code that look and operate very close to each other. For example https://github.com/torvalds/linux
by adamzochowski 13y ago
Column mode becomes helpful any time you have a few lines of code that look and operate very close to each other.
For example https://github.com/torvalds/linux/blob/master/security/commoncap.c https://github.com/torvalds/linux/blob/master/security/commo...
you are writing "cap_capget", you could write three lines,
effective
inheritable
permitted
And now, select in block mode the text you typed, click copy.
Then select blank column to the right of any of the text, and type
= cred->cap_
once you finished typing that (since you typed in block mode, it typed that across all 3 lines at once), now press your ctrl-v . and then type semicolon. Done.
*effective = cred->cap_effective;
*inheritable = cred->cap_inheritable;
*permitted = cred->cap_permitted;
Here is some quick example of how you could use column mode during programming.
http://www.youtube.com/watch?v=yeYmPV3DpG8 http://www.youtube.com/watch?v=yeYmPV3DpG8