[PYTHON] vim settings (editing my own notes)

.vimrc settings

set to vi incompatibility mode

if &compatible set nocompatible endif

Character encoding = UTF8

if has("multi_byte_encoding") set encoding=utf-8 endif

Enable syntax highlighting

syntax enable This command actually executes the following command: source VIMRUNTIME/syntax/syntax.vim If the environment variable VIM is not set, Vim is another way(|VIMRUNTIME|reference)In the pass Try to search. This usually works. If it doesn't work, put Vim in the environment variable VIM Try to set the directory where the configuration files are located. For example, the syntax file is If it's in the directory "/ usr / vim / vim50 / syntax", then $ VIMRUNTIME should be "/ usr / vim / vim50" To set. This must be set in the shell before launching Vim.

Display color setting (256 colors). See also: vim doc terminal-options

set t_Co=256

Specifies the type of line feed (EOL).

set fileformats=unix,dos

When Tab is hit in the margin at the beginning of the line, a space is inserted by the value of'shiftwidth'.

White is inserted as many as'tabstop' except at the beginning of the line. set smarttab

When inserting a Tab in insert mode, use the appropriate number of whitespace instead.

set expandtab It also uses spaces for indentation with commands'>' and'<', and for indentation when the option'autoindent'is on. Use CTRL-V to insert a real tab when'expandtab'is on.

Enable virtual editing in rectangular visual mode.

set virtualedit=block Virtual editing allows you to place the cursor where there are no characters. In other words, you can move the cursor inside the tab character or behind the end of the line. This is useful when selecting rectangles in visual mode or when editing a table.

The search pattern is not case sensitive. Also applies to searches in tag files

set ignorecase

Override the option'ignorecase' if the search pattern contains uppercase letters.

set smartcase Only used if'ignorecase' is on when the search pattern is typed in from the keyboard. The commands applied are "/", "?", "N", "N", ": g", ": s". It does not apply to "*", "#", "gd" or tag search.

Even while typing a search command, the text that matches the pattern up to the point you typed is displayed immediately.

set incsearch

When the search reaches one end of the buffer, it moves to the other end and the search continues.

set wrapscan

You can customize the display of tabs, line breaks, spaces, and more.

set list set listchars=tab:>-,trail:~

Display line numbers.

set number

Set when the status line is displayed in the bottom window. 2 = always displayed

set laststatus=2

Always show tab page labels

set showtabline=2

Make the clipboard available

set clipboard=unnamed

Sets the behavior of BS, Del, CTRL-W, CTRL-U in insert mode.

set backspace=eol,indent,start

Use command line completion in extended mode.

set wildmenu set wildmode=list:full set wildignore=.o,.obj,.pyc,.so,*.dll

Tag file related

if has('path_extra') set tags& tags +=.tags,tags endif

Neobundle installation

mkdir -p ~.vim/bundle git clone https://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim

Below in .vimrc

set runtimepath+=~/.vim/bundle/neobundle.vim/ call neobundle#begin(expand('~/.vim/bundle/')) NeoBundleFetch 'Shougo/neobundle.vim' NeoBundle 'Shougo/unite.vim' call neobundle#end() NeoBundleCheck

Install the taglist plugin

$sudo apt-get install exuberant-ctags

In .vimrc NeoBundle 'vim-scripts/taglist.vim' NeoBundle 'szw/vim-tags'

" taglist set tags = tags let Tlist_Ctags_Cmd = "/usr/bin/ctags" let Tlist_Show_One_File = 1 let Tlist_Use_Right_Window = 1 let Tlist_Exit_OnlyWindow = 1

File format detection & loading plugins by file format, indenting by file format, enabled (see: vim documentation)

filetype plugin indent on

Recommended Posts

vim settings (editing my own notes)
VIM settings
change vim settings
I made my own language (2)
I made my own AML