How to delete columns in vi file? [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I have a vi file containing hundreds of lines with the following format
029.inp.log: SCF Done: E(RHF) = -844.790844670 A.U. after 26 cycles
I want to delete all of the columns (separated by spaces/tabs. got messed up when I pasted it here) other than the first (029.inp.log:) and the fifth (-844.790844670). Can anyone help me?

Press ctrl+v for block selection. use h, j, k, l keys to navigate and press key d to delete the selected block. The graphical editor like kate also having capability of the block selection.

If you are not confined to vi, shell command is a good choice for this task.
cat your_filename | cut -f 1,5 > result_filename
About rectangle selection in vim, you must guarantee that the field in all lines with the same width.
Perhaps vim command
:%!cut -f1,5 is OK too, but I can not give it a try now.

Related

Open file with special character in linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I want to open file in linux 321716~~Amstredam Hero - Jimmy to Worker'''s Comp Waiver.pdf´ in linux. How can I open this file , i try ´ls - la 321716~~Amstredam Hero - Jimmy to Worker'''s Comp Waiver.pdf
It's not working ,please help
I think your question was formatted in a way that messed with the styling, but you should be able to just enclose the filename with " " or possibly you could type the start of it and use * like cat name* and it would cat every file in that directory starting with "name"
Are you aware that most UNIX-like terminals have a kind of intellisense feature? You just start by typing some characters, you type ESC two times and the terminal tries to complete the filename. This should help you with your problem.

Shortcut to get the first word of the previous command in the terminal [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I am using terminator for my terminal so maybe there is a specific shortcut for this on it.
Instead of hitting the up arrow and hitting crtl+w to delete the last word of the previous command (So I am left with just the command itself (first word of the previous command in this case), syntax is "[command] [string]")
I want a simple shortcut to give me the first word of the previously entered command.
Use Alt+. to get a previous word. It defaults to the last word, so prefix it with the index of the word you want: Alt+0 Alt+.. You can use Esc instead of Alt, as well.
Run this binding :
$ bind '"'$(tput kf5)'":"'$(tput cuu1)$'\x01\ef \x0b"'
Press F5 to get last command name only.

Moving to previous region in *nix Screen [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have been a fan of Screen for quite some time now, and I often like to have three separate "regions" (what is created with "Ctrl-a + S" or "Ctrl-a + |"). Now when I am in a region and I want to go back one, I have been performing "Ctrl-a + Tab" twice to simply move back a region. After extensive searching online and analyzing a cheat sheet here, I have yet to find the opposite to the "Ctrl-a-Tab" command. Can someone throw me a bone?
There is no keybinding for this behavior available by default, but you can create one by adding the following line to your .screenrc:
bind Q focus up
where Q is a character of your choice; pressing CTRL-A Q will then move back one region.

Speed up VIM cursor moving through j/k [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
On my friend new Mac, he scrolls from line #1 to line #100 using k in around 4 seconds.
On my Mac, it takes 10 seconds. Neither of us know what causes his MacVim scrolls that fast.
Any way that I can improve the speed of scrolling on my MacVim? I already enabled ttyfast and lazyredraw
The problem might be the difference in your keyboard settings instead of Vim. Try changing the Key Repeat setting in OS X' keyboard settings and see what happens. On my MacBook this setting affects the cursor movement speed when holding h, j, k or l.
As mentioned in comments some software such as KeyRemap4Macbook can override the system settings.
Also consider using commands ^U, ^D and G instead of hjkl when navigating around longer files.

Lotus Notes: Move email to a folder [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have reading the shortcut keys for lotus notes, but could not find anything to move an email to a selected folder? Is there a shortcut key? if not, is there a way to creat such a shorcut
Thanks
Unfortunately there is no direct shortcut for move to folder. I always use the possibility to access the Action- Bar Buttons Pressing ALT + the number of the action- button that shows when holding the ALT- Key + the underlined character that shows, when the submenu opens.
Unfortunately the order and number of the buttons in the action bar differ from version to version. And you can only access the first 9 Actions with this method.
In Version 9 and the english template the right combination is: ALT + 5 then M (Move to folder)

Resources