Hey guys,
I am trying to use bash vi mode by issuing "set -o vi" but I am facing two issues; first many of the vi commands are not working and second once I am in the command mode by pressing the Esc key just after I press a single button (e.g., b to go back a word) the mode changes to the normal insert mode. I'm wondering whether there is a way around these two problems.
Write a Unix shell script named 'mode' that accepts two or more arguments, a file mode, a command and an optional list of parameters and performs the given command with the optional parameters on all files with that given mode.
For example, mode 644 ls -l should perform the command ls -l on all files in the current directory that have mode 644.
I came up with this code.
HI there. My teacher asked us to write a code for this question
Write a Unix shell script named 'mode' that accepts two or more arguments, a file mode, a command and an optional list of parameters and performs the given command with the optional parameters on all files with that given mode.
While in normal mode I can delete all the characters after the cursor by typing d$. I'd like to achieve the same but in insert mode in the same way that you can delete things to the left of the cursor with Ctrl + W
In Org-mode I would like to insert the result of a Unix command in a field. For instance, consider I have the following table:
| / |
| /bin |
| /usr/bin |
| /lib |
| /usr/lib |
I would like to insert a second column such as
$2 = <result of `du -sh $1` >
Is this possible?
I use Vim a lot, and I know how I can start vim in insert mode. So I have an alias named vii in my .bash_aliases file.
On other hand I use Git a lot too, and I have this line in my .gitconfig:
[core]
editor = vi
To write a commit message the vi editor is opened every time and I have to go in insert mode.
When I hit the <s-f2> key to execute my nnoremap <s-f2> :set number! mapping Vim opens its "Insert" mode above (O) and types the 1;2Q string.
I was an emacs user, and I have to switch to vim. But I miss some basic emacs commands in vim edition mode:
C-A
C-E
C-K
C-Y
C-x C-s
...
Through the several tutorials and tips and tricks site about Vim, I think I happened to read that one can reassign a combination of keys in Vim.
I would have loved to switch between vim tabs more easily and quicker that typing :tabn or :tabp each time.
For the moment Ctrl + Left or Right arrow, makes me switch from command mode to insert mode, and pastes the character c or d according the arrow