Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Vim Script by yach ( 14 years ago )
set nocompatible

"по control-p вставлять скопированноенное
map <c-p> "0p

"
map <Tab> :bn<CR>
map <C-Tab> :bp<CR>

"maximize screen
"au GUIEnter * simalt ~Р
"au GUIEnter * simalt ~X

set fileencodings=utf-8

"mouse blink
set guicursor=a:blinkon0

"переход по видимым строкам
map k gk
map j gj

set mousehide  " Hide the mouse when typing text

"russian keyboard
set keymap=russian-jcukenwin
set iminsert=0 
" по умолчанию - латинская раскладка при поиске 
set imsearch=0 

set iskeyword=@,48-57,_,192-255 "для русских слов

set guioptions-=m
set tabstop=4
set guioptions-=T

colors desert2

set guifont=courier:h15

set wrap
set linebreak
set number
set numberwidth=1
set ignorecase
set infercase
set shiftwidth=4

cd D:/work
"map <C-Home> :Explore C:Documents and SettingsUservim files<cr>
"развернуть на полный экран
map <C_Enter> :simalt  ~Р<CR>

set fileencodings=utf-8

set bufhidden=hide

set statusline=%<%f%h%m%r%=format=%{&fileformat;} file=%{&fileencoding;} enc=%{&encoding;} %b 0x%B %l,%c%V %P
set laststatus=2 "always show status line
set ch=1  " Make command line high

  " Горячие клавиши скрытия/отображения меню -->
        function MyToggleMenu()
            let old_guioptions = &guioptions; " Если меню в данный момент видимо
            if stridx(old_guioptions, 'm') != -1
                set guioptions-=m
            else
                set guioptions+=m
            endif
        endfunction
        cmap <F12> <ESC>:call MyToggleMenu()<CR>
        imap <F12> <ESC>:call MyToggleMenu()<CR>
        nmap <F12> :call MyToggleMenu()<CR>
        vmap <F12> <ESC>:call MyToggleMenu()<CR>

    " Горячие клавиши скрытия/отображения меню <--
" Меню <-- 

"автодополнение
"This is set to 'ignorecase' when the popup menu is opened.
let g:AutoComplPop_IgnoreCaseOption=1
"for <c-y> in insert mode
let g:AutoComplPop_MappingDriven=1

" Включаем 'умную' автоматическую расстановку отступов
set smartindent
set autochdir

set nocursorline

set tildeop

set ballooneval

set hi=1000

imap <C-Space> <C-F>

" Фолдинг 
set foldmethod=syntax
set foldminlines=2
map zo zO
"set foldclose=all

au BufNewFile,BufRead *.* set cursorline
au BufNewFile,BufRead *.* set nowrap
au BufNewFile,BufRead *.js set omnifunc=javascriptcomplete#CompleteJS
au BufNewFile,BufRead *.js imap { {<left><space><right><cr>}<left><cr><up><tab>

au BufNewFile,BufRead *.js setlocal foldexpr=getline(v:lnum)=~'{.*}.*$'?-1:getline(v:lnum)=~'{'?'a1':getline(v:lnum)=~'}'?'s1':'='
au BufNewFile,BufRead *.js setlocal foldmethod=expr
au BufNewFile,BufRead *.js setlocal debug=msg
"au BufWinEnter *.js setlocal foldmethod=manual
au FileChangedShell *.js setlocal foldmethod=manual


au BufNewFile,BufRead *.txt setlocal filetype=off
au BufNewFile,BufRead *.txt setlocal sidescroll=5
au BufNewFile,BufRead *.txt setlocal sidescrolloff=5
au BufNewFile,BufRead *.txt set nocursorline

"менять домашнюю дирректорию на 
au BufNewFile,BufRead *.* cd %:h

set incsearch
set clipboard+=unnamed

" Не выгружать буфер, когда переключаемся на другой
set hidden

set nohlsearch

set backspace=indent,eol,start whichwrap+=<,>,[,]
" Преобразование Таба в пробелы
set expandtab
" Опции сесссий
set sessionoptions=curdir,buffers,tabpages
" При закрытии Vim'а сохраняем информацию о текущей сессии
au VimLeave * :mksession! $vim/last.session

" Загружаем ранее сохраненную сессию -->
    if getfsize(".vim/ide.session") >= 0
        source $vim/ide.session
    endif
" Загружаем ранее сохраненную сессию <--

"highlight LineNR guifg=#f0f000 guibg=#3F3F3F
"автодополнение
set completeopt=menu,preview
filetype plugin indent on
filetype plugin on

"пробел вместо
"imap <C-Space> <C-X><C-U>

set listchars+=precedes:<,extends:> " показывать, когда строка выходит за края экрана
set sidescroll=5
set sidescrolloff=5

"в командной строке вместо стрелки вверх 
cnoremap <C-J> <Up>
"python highlight
let python_highlight_all=1
"    (This option not override previously set options)
"
"    For fast machines:
let python_slow_sync=1
"
"    For "print" builtin as function:
"       python_print_as_function

autocmd FileType python     map <F5> :w<cr>:!python %<cr> 
autocmd FileType python     imap <F5> <esc>:w<cr>:!python %<cr> 
autocmd FileType python     set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html       set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css        set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml        set omnifunc=xmlcomplete#CompleteTags
"autocmd FileType php        set omnifunc=phpcomplete#CompletePHP
"autocmd FileType c          set omnifunc=ccomplete#Complete

au BufNewFile,BufRead *.txt setlocal wrap 
au BufNewFile,BufRead *.txt setlocal nonumber 
au BufNewFile,BufRead *.txt setlocal nocursorline 
au BufNewFile,BufRead *.txt setlocal foldmethod=manual

"какие-то глюки
au BufNewFile,BufRead * :syntax on<cr>
au BufNew * :syntax on<cr>

au BufNewFile,BufRead *.rdf set syntax=xml
"au FileType xul set syntax=xml
au BufNewFile,BufRead *.xul set syntax=xml
au BufNewFile,BufRead *.manifest set syntax=xml

au FileType rdf set fileencoding=utf-8
au FileType manifest set fileencoding=utf-8
au FileType xul set fileencoding=utf-8

au BufNewFile,BufRead *.css imap { {<left><space><right><cr>}<left><cr><up><tab>
"au BufNewFile,BufRead *.css set omnifunc=csscomplete#CompleteCSS

"au FileType html inoremap > ></<C-X><C-O><esc>F<i
au FileType html map <F5> :w<cr>:!start D:programsfirefoxfirefox.exe %<cr>

" При выходе сохранить все открытые буферы.
"autocmd VimLeavePre * silent mksession $vim/lastession.vim

" Не использовать .swp-файл
set noswapfile

 

Revise this Paste

Your Name: Code Language: