Why the dot (.) command is so useful in VIM?

Here are some actions that I do with the dot command: Simpler than :%s/\<word\>/replacement/gc is * on the word, then cereplacement<esc> and then repeat n.. This is nice if you have two or three occurrences of your word. If you have several words that you want to replace, then go to the next word, hit … Read more

Getting the current row number?

What do you mean by “output”? You can do: :echo line(“.”) + 1 To display the current line number plus 1. You can bind a keystroke with map, eg: :noremap <F1> :echo line(“.”) + 1<cr> To actually insert the data into the buffer: :noremap <F1> :execute “normal! i” . ( line(“.”) + 1 )<cr>

The way to distinguish command-mode and insert-mode in Bash’s Vi command line editing

in /etc/inputrc (or ~/.inputrc) add this: set show-mode-in-prompt on this will prefix your prompt with + while in insert-mode, and : while in command mode in bash 4.3 EDIT: in the latest version of bash 4.4, you will instead get a prompt prefixed with “(ins)” or “(cmd)” by default. but, you can change that: set … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)