Table of contents:
Your key mapping can be different, find out with pressing ctrl-v on an empty
terminal and pressing ctrl-right/left afterwards
map <ESC>[1;5C <C-Right>
map <ESC>[1;5D <C-Left>
inoremap <expr><silent> <c-right> search('\s', 'Wn', line('.')) <bar><bar> col('.') >= col('$') - 1 ? '<c-right>' : '<c-o>$'
nnoremap <expr><silent> <c-right> search('\s', 'Wn', line('.')) <bar><bar> col('.') >= col('$') - 1 ? '<c-right>' : '$'
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
So no more Not an editor command: Q!
cabb W w
cabb X x
cabb Q q
map <F7> gg=G<C-o><C-o>
" for normal mode
nnoremap <C-S-right> :tabnext<CR>
nnoremap <C-S-left> :tabprevious<CR>
" for insert mode
inoremap <C-S-right> <Esc>:tabnext<CR>
inoremap <C-S-left> <Esc>:tabprevious<CR>
" Append modeline after last line in buffer.
function! AppendModeline()
let l:modeline = printf(" vim: set ts=%d sw=%d tw=%d %set :",
\ &tabstop, &shiftwidth, &textwidth, &expandtab ? '' : 'no')
let l:modeline = substitute(&commentstring, "%s", l:modeline, "")
call append(line("$"), l:modeline)
endfunction
" and bind this to whatever shortcut you want
nnoremap <silent> <Leader>ml :call AppendModeline()<CR>
As ad-hoc command:
:set list
:set listchars=tab:>-
:set noexpandtab
Or just make it single command in your rc file
command Showtabs set list|set listchars=tab:>-|set noexpandtab
Start your search with /\v
and use pipe to separate terms:
/\vword1|word2|word3