Which command line text editor has the closest keybindings to Notepadd++, Gedit, or Kate (or any modern CUA style editor)?

4

2

I'm looking for a text editor that has an amazing common user access (CUA) mode (or can be configured to have it) that resembles closely modern editors like Notepad++, Gedit, Kate, Sublime, etc.

I've tried Emacs cua-mode and made some custom keybindings for mcedit and they behave similar, but they just are not quite as close to Notepad++, Gedit, or Sublime. I'm wondering if anyone has done extensive set up of any text editor and gotten it to be almost exactly the normal modern text editors in terms of CUA mode.

Other editors that I've tried include diakonos and tilde, but they also don't emulate modern CUA mode as much as I'm aiming for.

Maybe such an editor doesn't exist? Or maybe someone has hacked the heck out of emacs to make this happen (it seems to be the most configurable editor)?

If such a command-line editor doesn't exist, it'd be a fun project to make one that emulates the features in Sublime Text (or at least Gedit, Notepad++, and Kate).

trusktr

Posted 2012-11-14T09:52:20.990

Reputation: 1 521

grigio has a nice setup for vim with his vimrc. It is a collection of vim bundles. NerdTree and Silver Search might also be good ones to add.

– NonlinearFruit – 2015-10-27T03:31:52.123

1Wow, the amazement of reading this post 3 years later. I use nothing but vim now. – trusktr – 2015-10-27T03:37:44.987

1I know it's not in scope of your question, but when it comes to command line the only one is vim! Worth every second of learning. – Mose – 2012-11-14T09:55:57.903

@Mose That may be true, but it has such an exponential learning curve. Lol... Have you heard of Sublime Text (http://sublimetext.org)? It's probably the most powerful (non-command-line) text editor ever, and it is (of course) CUA style like all editors in modern desktops are these days. I believe that a CUA-style command-line editor could be just as powerful as VIM, but it just hasn't been done before... we've skipped the opportunity to create an amazing CUA command-line editor in preference of desktop editors... A fun project would be making a command-line editor that emulates sublime text...

– trusktr – 2012-11-19T02:07:31.210

Answers

0

I am biased toward Vim, so I would tell you to use Fabien Cazenave's cua-mode.vim plugin. This will get you all the CUA features you're asking for, plus the entire Vim ecosystem on top of it, and "infinite tweakability and customization" to boot. The plugin source, even if you're not familiar with VimScript, is fairly self-explanatory given the comments. For example:

" CTRL-Z is Undo
noremap  <C-Z> u
inoremap <C-Z> <C-O>u

" CTRL-X and SHIFT-Del are Cut
vnoremap <C-X>   "+x
vnoremap <S-Del> "+x

" CTRL-C and CTRL-Insert are Copy
vnoremap <C-C>      "+y
vnoremap <C-Insert> "+y

" CTRL-V and SHIFT-Insert are Paste
map <C-V>      "+gP
map <S-Insert> "+gP

Using Vim will allow you to tweak your CUA configuration to your heart's content and allow you to make other changes to how the editor behaves to fit your needs as well. Additionally, you may find over time that you want to wean yourself away from CUA controls into a different editing style (modal or otherwise) and Vim will allow you to do this gradually, a bit of configuration at a time, rather than forcing a whole regime on you like a lot of modern editors might.

I suggest starting out with a blank Vim configuration, installing Vundle to manage your plugins, then making cua-mode.vim your first plugin after that. Here's a sample .vimrc I tested in Windows 10:

" filetype off
set nocompatible
" Vundle ===============================================================
" Set the runtime path to include Vundle and initialize
set rtp+=$HOME/vimfiles/bundle/Vundle.vim/
call vundle#begin('$USERPROFILE/vimfiles/bundle/')
" Let Vundle manage Vundle (required)
Plugin 'VundleVim/Vundle.vim'
" Additional plugins
Plugin 'fabi1cazenave/cua-mode.vim'
" All of your Plugins must be added before the following line
call vundle#end()
filetype plugin indent on
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

Start with the wiki article on installing Vundle on Windows, then add the .vimrc above into a file called _vimrc in your Windows user profile directory and you'll be on your way.

I am in complete agreement with Ben Orenstein when he suggests you start off with a basic .vimrc and add to it as you improve, so that you know what everything in your configuration does and why.

Hope that helps.

treehead

Posted 2012-11-14T09:52:20.990

Reputation: 526

0

try microEMACS http://www.jasspa.com/ It also has key bindings of emacs, nedit and wordstar It's highly configurable

Tuesday

Posted 2012-11-14T09:52:20.990

Reputation: 1