Question:
vim and gvim command questions?
Insomnia19
2011-03-09 16:33:25 UTC
1. In vim/gvim, what command will indent an entire curly-bracket block one level, while the cursor is
currently on either the open or close curly bracket of the block? Likewise what command will shift
an entire curly-bracket block one level left (de-indent block)?
2. Using the ls command, how can you quickly find the size in bytes of all the files in the current
directory sorted in ascending order (file with the largest size in bytes should be the *last* one listed
by ls showing the file size in bytes)?
3. Copy and paste into your README file the sample run of PrintEnglish with a number and base that
spells out "C S E eight B". Do the same for your name. Depending on the length and letters in your
name, you may not be able to spell your name out completely from one integer value. An int can
hold values from -2147483648 to +2147483647. If your calculated number to spell out your name is
larger than 2147483647, break it up into two (or more if you need) numbers to print your name
across two executions. Feel free to use a shortened name. For example, Anu vs. Anupallavi.
Four answers:
?
2011-03-09 16:45:34 UTC
Well... 1 is a vim question. 2 is a linux/unix question. 3 is.... a weird question?



1. If you have autoformat included for the file type you are editing, it would be tab, but it would autoindent as you type. Otherwise I know of no automagic commands to add or remove indentation.

2. ls -S (sort by file size, see link below)

3. I mean what is this? Is this what you are supposed to paste in? In vim, just open the README with "vim README", then press "i" and paste in whatever you want.
?
2016-11-15 12:49:35 UTC
Gvim Commands
Gorav
2011-03-11 04:39:52 UTC
1. - position your cursor to start of the block

- press v (assuming you are not in insert mode)

- Now, select the block with arrow keys

- Press the number (e.g. 1 or 2) how many tabs you wanted

- Press, > or < key (by using shift key)

- It will actually indent the whole block to number of tabs.

- You can play with it, and get more results



2. Use ls -lSh





Hope this helps

Gorav
?
2016-10-28 05:48:15 UTC
Drag it as a shortcut? Sorry your question makes no experience, shortcut will always be a GUI icon element if you're asking about utilising run command associating it finally. everybody dealing with XP or more recent command line is conscious in basic terms typing the report/dir would have linked MIME application fired as a lot as view or edit it.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...