I'm pretty sure every editor has been mentioned by now
Does anyone remember brief ? Actually I didn't realise it was still available....
I'm pretty sure every editor has been mentioned by now
syntax on
set clipboard=autoselect " use X PRIMARY selection
set noswapfile " disable swap file
set shortmess+=I " disable uganda children
set history=1000 " set number of lines of vim command history
set laststatus=2 " always show status line
set autochdir " working dir is always the same as the file
set ignorecase " ignore case when search
set smartcase " ignore case only when lack uppercase
set hlsearch " highlight search
set incsearch " search while typing
set wildmenu " show command predictions
set ttyfast " faster scrolling
set mouse=a " enable mouse support
"set ttymouse=sgr " available values: xterm, xterm2, netterm, dec, jsbterm, pterm
set backspace=2 " disable vi backspace behavior
set autoindent " copy indent from current line when starting a new line
set ruler " show cursor position
set formatoptions-=cro " disable auto comment insertion
set scrolloff=3 " lines before and after cursor when search
set pastetoggle=<F2> " toggle paste mode
set t_Co=256 " force to use 256 colors
"set t_ti= t_te= " disable screen buffer
set noeb vb t_vb= " disable beeping
set fillchars=stlnc:-,vert:\│ " split border and inactive statusline chars
set whichwrap+=<,>,[,] " change lines with left/right arrow
"set list " display TABs
set listchars=tab:+- " characters to be used to show TABs
set title " enable titles
set titlestring=%F%m\ -\ VIM " vim titles format
set statusline=%3*%y\ \ %1*%F%2*%m%3*\ \ %{&fileencoding?&fileencoding:&encoding}\ %=\ %1*%l\|%3*%L,%v\ \ %1*%P%*
colorscheme slate
" ctrl+6 to use different keymap in insert mode,
" but always use english to manipulate vim anyway
set keymap=russian-jcukenwin
set iminsert=0
set imsearch=0
" change some colors
hi User1 ctermbg=none ctermfg=white cterm=bold,underline
hi User2 ctermbg=none ctermfg=red cterm=bold
hi User3 ctermbg=none ctermfg=gray cterm=underline
hi TabLine ctermfg=gray ctermbg=black cterm=none
hi TabLineSel ctermfg=white ctermbg=black cterm=bold
hi TabLineFill ctermfg=black ctermbg=black cterm=underline
hi StatusLine ctermbg=none ctermfg=white cterm=bold
hi StatusLineNC ctermbg=none ctermfg=gray cterm=none
hi Visual ctermfg=none ctermbg=black cterm=bold,standout
hi ModeMsg ctermfg=green ctermbg=none cterm=bold
hi WildMenu ctermfg=green ctermbg=none cterm=bold,underline
hi VertSplit ctermfg=green ctermbg=none cterm=underline
hi Search ctermfg=green ctermbg=none cterm=underline,bold
" key bindings
command! W w
command! Q q
" alt+backspace
map <Esc><BS> dvb
im <Esc><BS> <C-w>
" alt+delete
nm <Esc>[3;3~ de
im <Esc>[3;3~ <C-o>de
" alt+z/shift+alt+z - undo/redo in insert mode
im <Esc>z <C-o>:undo<CR>
im <Esc>Z <C-o>:redo<CR>
" r -redo
nm r <C-r>
" p - replace selected
vm p pgvy
" space - clear search highlight
nm <silent> <Space> :nohlsearch<Bar>:echo<CR>
" ctrl+t - new tab in normal mode
nm <C-t> :tabnew<CR>
" ctrl+c - close tab in normal mode
nm <C-c> :close<CR>
" shift+q - close session in normal mode
nm <S-q> :conf qa<CR>
" shift+y - save file in normal mode
nm <S-y> :write!<CR>
" shift+u - update file in normal mode
nm <S-u> :edit!<CR>
" shift+y - yank from cursor to EOL in visual mode
vm Y <Esc>vg_y
" ctrl+shift+alt+pgup/pgdown to move tabs
map <C-S-M-PageUp> :tabmove -1<CR>
map <C-S-M-PageDown> :tabmove +1<CR>
" alt+c - yank selected to clipboard
vm <Esc>c "+y
" alt+x - cut selected to clipboard
vm <Esc>x "+x
" ctrl+v - paste from clipboard in visual/insert/command mode
vm <C-v> "+gp
map! <C-v> <C-R>+
" ctrl+n to show/hide line numbers
nm <C-n> :set invnumber<CR>
" ctrl+l show/hide TAB characters
nm <C-l> :set list!<CR>
" ctrl+f - show number of search results
nm <C-f> :%s///gn<CR>
" ctrl+alt+y - write file with sudo
nm <Esc><C-y> :silent write !sudo tee %<CR>
" ctrl+up/down - home/end
nm <C-up> 0
nm <C-down> $
im <C-up> <C-o>0
im <C-down> <C-o>$
" alt+up/down - delete all text before/after cursor
nm <M-up> v0d
nm <M-down> d$
im <M-up> <C-o>d0
im <M-down> <C-o>d$
" alt+left/right - delete left/right word
nm <M-left> dvb
nm <M-right> de
im <M-left> <C-w>
im <M-right> <C-o>de
" ctrl+alt+up/down - remove/duplicate line
nm <C-M-up> yyp
nm <C-M-down> dd
im <C-M-up> <Esc>yyp
im <C-M-down> <Esc>dd
" ctrl+alt+left/right - backward/forward word in insert mode
im <C-M-left> <C-o>B
im <C-M-right> <C-o>W
" ctrl+w-\ - maximze current pane (ctrl+w-= to unmaximize)
nm <C-W>\ <C-W>\| <C-W>_
" F3/F4 - split vertically/horizontally
nm <F3> :vsplit<CR>
nm <F4> :split<CR>
" F5 - show word count
map <F5> :w !detex \| wc -w<CR>
" ctrl+del - delete characer from begining of line
function! DeleteFirstChar()
let save_pos = getpos(".")
normal! 0x
call setpos(".", save_pos)
endfunction
nm <Esc>[3;5~ :call DeleteFirstChar()<CR>
im <Esc>[3;5~ <C-o>:call DeleteFirstChar()<CR>
" Auto paste mode when insert
if exists('$DISPLAY')
let &t_SI .= "\<Esc>[?2004h"
let &t_EI .= "\<Esc>[?2004l"
inoremap <special> <expr> <Esc>[200~ XTermPasteBegin()
function! XTermPasteBegin()
set pastetoggle=<Esc>[201~
set paste
return ""
endfunction
endif
" check file changes every 4s and update file if it was changed
set autoread | au CursorHold * checktime | call feedkeys("lh")
" restore last cursor position
if has('autocmd')
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
sam
for graphical and ed
for cli.Is there a list of editors that don't use a startup delay?
Well I mean in human terms since it is me (the human) which is the end user) - so, something like 20ms. Even 50ms would be acceptable.You mean, editors which need 0 nanoseconds to start? I'm afraid that there are none.
vi
, and then type ee
after that. You'll see. Typevi
, and then typeee
after that. You'll see.
ee
is even rather slow when directly compared to ed
.Ah, so you actually mean "no visible delay"? Hmm,ee
is even rather slow when directly compared toed
.
Other low-latency editors which I enjoyed or still enjoy using include (but are not limited to) SciTECO and Micro. Most CLI editors, except GNU Emacs and (Neo)Vim, are relatively fast though.
Honorary mention: edwood - a surprisingly good and fast implementation of the (GUI) Acme text editor.
Emacs
and mg
. I use vi
because it is everywhere, but i don't love it. I use vi because it is everywhere
comparing to emacs / mg it really isI wish it was.