loading...

re: Nano is a good editor VIEW POST

FULL DISCUSSION
 

Nano: ctrl-r. (With the default configuration you'll have to follow it with alt-f or it'll get read into the current buffer, but really what are you doing with your life if you didn't set the config option to fix that.)

Since the post is not strictly sticking to the default configuration in nano, the same flexibility should be afforded to Vim too. One can easily configure Vim to allow the above-mentioned operations in as few keypresses as possible.

For example, I have configured my vim to allow saving files (buffers), changing them, etc. in the following way:

" To open a new empty buffer
nmap <leader>t :enew<cr>

" Move to the next buffer
nmap <leader>d :bnext<CR>
" Move to the previous buffer
nmap <leader>a :bprevious<CR>

" Close the current buffer and move to the previous one
" This replicates the idea of closing a tab
nmap <leader>bq :bp <BAR> bd #<CR>

" Show all open buffers and their status
nmap <leader>bl :ls<CR>

" Save the current buffer
noremap <leader>s <Esc>:update<CR>
" Save all the buffers
noremap <leader><S-s> <Esc>:wa<CR>

As you can see, almost all operations are under 3 keypresses.
Overall -- what I mean to say is -- with proper configuration, any editor can be tweaked to operate with as few keypresses as possible.

 

Very good point. It was a pretty unfair comparison on my part, I suppose.

code of conduct - report abuse