vim

Console text editor for *NIX.

Zenburn look and feel for Vim and GVim

Edit ~/.vimrc and add the following echo -e "set t_Co=256\ncolors zenburn" >> ~/.vimrc

autocmd BufRead,BufNewFile *.pya set filetype=python
autocmd BufRead,BufNewFile *.pyb set filetype=python
autocmd BufRead,BufNewFile *.wsgi set filetype=python

set t_Co=256
colors zenburn
set number
syntax on

Run the following:

Zenburn colors: zenburn.vim

Open file

Exit without save

Save and exit

Insert

Delete line

Delete character

Undo

Copy

Cut

Paste

Search and replace all occurrences

Go to the top of a file

Go to the end of a file

Vi settings

Settings are saved in ~/.exrc. For OpenSolaris/OpenIndiana

set number
set showmode

Add extension wsgi

File /usr/share/vim/vim74/filetype.vim in Ubuntu 14.04 LTS (Trusty).

#line 1577 in Ubuntu
au BufNewFile,BufRead *.py,*.pyw,*.wsgi         setf python

Add other extensions

File ~/.vimrc

autocmd BufRead,BufNewFile *.wsgi set filetype=python
autocmd BufRead,BufNewFile *.pya set filetype=python
autocmd BufRead,BufNewFile *.pyb set filetype=python

vimrc with key mappings

filetype plugin on
filetype indent on
colors zenburn

set t_Co=256
set nocompatible
set tabstop=4
set shiftwidth=4
set expandtab
set cursorline
set number
"This is a comment in vimrc. It does not have a closing quote 
map <M-left> :previous<cr>
map <M-right> :next<cr>
"save
map <C-s> :w<cr>
" quit all
map <F4> :qa!<cr>
" go to shell
map <F1> :sh<cr>
" write curr date time
map! <F6> <C-R>=strftime('%Y-%m-%dT%H:%M:%S')<cr>
" paste  
map <C-v> p
" undo
map <C-u> u
" refresh
map <F5> :edit!<cr>
" go beginning
map <F7> gg=G
" search
map <F3> /
" start marking
map <C-b> v
" copy
map <C-c> y
" select all
map <C-a> ggVG

Plugin Conque Shell

#Place the tar gz contents (autoload/doc/plugin/syntax in the ~/.vim
wget https://www.vim.org/scripts/download_script.php?src_id=16251
cd .vim/
tar xvzf download_script.php\?src_id\=16251

:ConqueTermSplit bash
:ConqueTermVSplit bash
# ctrl+w switch buffer
# :bd    delete current buffer 

pathogen plugin manager

mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

Enable markdown syntax

Enable python syntax

MoinMoin syntax

 ~/.vim/filetype.vim

augroup filetypedetect
au BufNewFile,BufRead *.moin setf moin
au BufNewFile,BufRead *.wiki setf moin
augroup END

Download moin.vim and copy to ~/.vim/syntax/

To enable syntax highlighting of a particular wiki page, add the following as a comment on the page: 

## vim:filetype=moin

Or simply save the text file as filename.moin , vim will automatically recognize this suffix name. 

vim (last edited 2021-08-26 13:58:07 by localhost)