vim and deps in main
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=gVim
|
||||
GenericName[en]=Gvim Text Editor
|
||||
GenericName[tr]=Gvim Metin Düzenleyici
|
||||
Comment[en]=A highly configurable text editor
|
||||
Comment[tr]=Özelleştirilebilir metin düzenleyici
|
||||
Exec=/usr/bin/gvim -f
|
||||
Icon=/usr/share/pixmaps/gvim.xpm
|
||||
Terminal=false
|
||||
Type=Application
|
||||
MimeType=text/css;text/html;text/htmlh;text/plain;text/rss;text/sgml;text/x-adasrc;text/x-authors;text/x-c++hdr;text/x-c++src;text/x-copying;text/x-credits;text/x-csharp;text/x-csrc;text/x-dtd;text/x-fortran;text/x-gettext-translation-template;text/x-gettext-translation;text/x-gtkrc;text/x-haskell;text/x-idl;text/x-install;text/x-java;text/x-js;text/x-ksh;text/x-ksysv-log;text/x-literate-haskell;text/x-log;text/x-makefile;text/x-moc;text/x-msil;text/x-nemerle;text/x-objcsrc;text/x-pascal;text/x-patch;text/x-readme;text/x-scheme;text/x-setext;text/x-sql;text/x-tcl;text/x-tex;text/x-texinfo;text/x-troff-me;text/x-troff-mm;text/x-troff-ms;text/x-uil;text/x-vb;text/xml;
|
||||
Categories=Application;TextEditor;
|
||||
@@ -0,0 +1,46 @@
|
||||
/* XPM */
|
||||
static char *magick[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"32 32 8 1",
|
||||
" c Gray0",
|
||||
". c #000080",
|
||||
"X c #008000",
|
||||
"o c Green",
|
||||
"O c #808080",
|
||||
"+ c #c0c0c0",
|
||||
"@ c Gray100",
|
||||
"# c None",
|
||||
/* pixels */
|
||||
"############### ###############",
|
||||
"############## oo ##############",
|
||||
"### oXXo # ###",
|
||||
"## @@@@@@@@@@@ XXXo @@@@@@@@@ ##",
|
||||
"## @+++++++++++ XXX @+++++++++ #",
|
||||
"### ++++++++++O XXXX ++++++++O #",
|
||||
"#### O++++++OO XXXXXX O+++++OO #",
|
||||
"#### @++++++O XXXXXX @+++++OO ##",
|
||||
"#### @++++++O XXXXX @@++++OO ###",
|
||||
"#### @++++++O XXXX @@++++OO ####",
|
||||
"#### @++++++O XXX @@++++OO #####",
|
||||
"#### @++++++O XX @@++++OO . ####",
|
||||
"### @++++++O X @@++++OO XX. ###",
|
||||
"## o @++++++O @@++++OO XXXX. ##",
|
||||
"# oX @++++++O @@++++OO XXXXXX. #",
|
||||
" oXX @++++++O@@++++OO XXXXXXXX. ",
|
||||
" oXX @++++++O@++++OO XXXXXXXXX. ",
|
||||
"# oX @++++++O++++OO XXXXXXXXX. #",
|
||||
"## o @++++++++++ XXXXXXXXX. ##",
|
||||
"### @+++++++++ ++ XXXXXXXX. ###",
|
||||
"#### @+++++++++ ++ XXXXXXX. ####",
|
||||
"#### @++++++++O X X ###",
|
||||
"#### @+++++++O +++ +++ +++ ++ ##",
|
||||
"#### @++++++OO ++ ++++++++++ #",
|
||||
"#### @+++++OO ++ ++..++ + ##",
|
||||
"#### @++++OO X ++ ++. ++ ++ ##",
|
||||
"#### @+++OO XX ++ ++ ++ ++ ##",
|
||||
"#### @++OO X ++ ++ ++ ++ ###",
|
||||
"##### +OO ## +++ ++ ++ +++ ##",
|
||||
"###### #### . ## ## ###",
|
||||
"############## .. ##############",
|
||||
"############### ###############"
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Start GUI Vim on a copy of the tutor file.
|
||||
|
||||
# Usage: gvimtutor [xx]
|
||||
# See vimtutor for usage.
|
||||
|
||||
exec `dirname $0`/vimtutor -g "$@"
|
||||
Binary file not shown.
@@ -0,0 +1,42 @@
|
||||
" Vim plugin
|
||||
" Purpose: Intelligently create content for PISI's action.py files
|
||||
" Author: A. Murat Eren
|
||||
" Copyright: Copyright (c) 2005 A. Murat Eren & S. Çağlar Onur
|
||||
" Licence: You may redistribute this under the terms of the GNU GPL v2..
|
||||
|
||||
if &compatible || v:version < 603
|
||||
finish
|
||||
endif
|
||||
|
||||
fun! MakeNewActionsPY()
|
||||
set nopaste
|
||||
|
||||
0 put = '# -*- coding: utf-8 -*-'
|
||||
put = '#'
|
||||
put = '# Copyright 2011 TUBITAK/BILGEM'
|
||||
put = '# Licensed under the GNU General Public License, version 2.'
|
||||
put = '# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt'
|
||||
put = ''
|
||||
put = 'from pisi.actionsapi import autotools'
|
||||
put = 'from pisi.actionsapi import pisitools'
|
||||
put = 'from pisi.actionsapi import get'
|
||||
put = ''
|
||||
put = 'def setup():'
|
||||
put = ' pass'
|
||||
put = ''
|
||||
put = 'def build():'
|
||||
put = ' pass'
|
||||
put = ''
|
||||
put = 'def install():'
|
||||
put = ' pass'
|
||||
14
|
||||
endfun
|
||||
|
||||
com! -nargs=0 NewActionsPY call MakeNewActionsPY()
|
||||
|
||||
augroup NewActionsPY
|
||||
au!
|
||||
autocmd BufNewFile actions.py call MakeNewActionsPY()
|
||||
augroup END
|
||||
|
||||
" vim: set et foldmethod=marker : "
|
||||
@@ -0,0 +1,11 @@
|
||||
diff -Nur vim72-old/runtime/filetype.vim vim72/runtime/filetype.vim
|
||||
--- vim72-old/runtime/filetype.vim 2008-10-18 01:14:23.000000000 +0300
|
||||
+++ vim72/runtime/filetype.vim 2008-10-18 01:15:01.000000000 +0300
|
||||
@@ -1677,6 +1677,7 @@
|
||||
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
|
||||
" Gentoo ebuilds are actually bash scripts
|
||||
au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,*.bash,*.ebuild call SetFileTypeSH("bash")
|
||||
+au BufNewFile,BufRead */etc/bash*completion*/* call SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .kshrc*,*.ksh call SetFileTypeSH("ksh")
|
||||
au BufNewFile,BufRead /etc/profile,.profile*,*.sh,*.env call SetFileTypeSH(getline(1))
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -Nur vim72-old/runtime/syntax/grub.vim vim72/runtime/syntax/grub.vim
|
||||
--- vim72-old/runtime/syntax/grub.vim 2008-10-18 01:14:23.000000000 +0300
|
||||
+++ vim72/runtime/syntax/grub.vim 2008-10-18 01:18:04.000000000 +0300
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
syn cluster grubCommands contains=grubCommand,grubTitleCommand
|
||||
|
||||
-syn keyword grubCommand contained default fallback hiddenmenu timeout
|
||||
+syn keyword grubCommand contained default fallback hiddenmenu timeout splashimage background gfxmenu
|
||||
|
||||
syn keyword grubTitleCommand contained title nextgroup=grubTitle skipwhite
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
if &compatible || v:version < 603
|
||||
finish
|
||||
endif
|
||||
|
||||
fun! MakeNewPSPEC()
|
||||
set nopaste
|
||||
|
||||
0 put = '<?xml version=\"1.0\" ?>'
|
||||
put = '<!DOCTYPE PISI SYSTEM \"http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd\">'
|
||||
put = '<PISI>'
|
||||
put = ' <Source>'
|
||||
put = ' <Name></Name>'
|
||||
put = ' <Homepage>http://</Homepage>'
|
||||
put = ' <Packager>'
|
||||
put = ' <Name></Name>'
|
||||
put = ' <Email></Email>'
|
||||
put = ' </Packager>'
|
||||
put = ' <License>GPLv2</License>'
|
||||
put = ' <Icon></Icon>'
|
||||
put = ' <IsA></IsA>'
|
||||
put = ' <Summary></Summary>'
|
||||
put = ' <Description></Description>'
|
||||
put = ' <Archive sha1sum=\"\" type=\"\">http://</Archive>'
|
||||
put = ' <BuildDependencies>'
|
||||
put = ' <Dependency></Dependency>'
|
||||
put = ' </BuildDependencies>'
|
||||
put = ' <Patches>'
|
||||
put = ' <Patch level=\"\"></Patch>'
|
||||
put = ' </Patches>'
|
||||
put = ' </Source>'
|
||||
put = ''
|
||||
put = ' <Package>'
|
||||
put = ' <Name></Name>'
|
||||
put = ' <RuntimeDependencies>'
|
||||
put = ' <Dependency versionFrom=\"\"></Dependency>'
|
||||
put = ' </RuntimeDependencies>'
|
||||
put = ' <Files>'
|
||||
put = ' <Path fileType=\"config\">/etc</Path>'
|
||||
put = ' <Path fileType=\"executable\">/usr/bin</Path>'
|
||||
put = ' <Path fileType=\"header\">/usr/include</Path>'
|
||||
put = ' <Path fileType=\"library\">/usr/lib</Path>'
|
||||
put = ' <Path fileType=\"localedata\">/usr/share/locale</Path>'
|
||||
put = ' <Path fileType=\"man\">/usr/share/man</Path>'
|
||||
put = ' <Path fileType=\"doc\">/usr/share/doc</Path>'
|
||||
put = ' <Path fileType=\"data\">/usr/share</Path>'
|
||||
put = ' </Files>'
|
||||
put = ' <AdditionalFiles>'
|
||||
put = ' <AdditionalFile owner=\"root\" permission=\"0644\" target=\"\"></AdditionalFile>'
|
||||
put = ' </AdditionalFiles>'
|
||||
put = ' <Provides>'
|
||||
put = ' <COMAR script=\"\"></COMAR>'
|
||||
put = ' </Provides>'
|
||||
put = ' </Package>'
|
||||
put = ''
|
||||
put = ' <History>'
|
||||
put = ' <Update release=\"1\">'
|
||||
put = ' <Date>YYYY-MM-DD</Date>'
|
||||
put = ' <Version></Version>'
|
||||
put = ' <Comment>First release.</Comment>'
|
||||
put = ' <Name></Name>'
|
||||
put = ' <Email></Email>'
|
||||
put = ' </Update>'
|
||||
put = ' </History>'
|
||||
put = '</PISI>'
|
||||
14
|
||||
endfun
|
||||
|
||||
com! -nargs=0 NewPSPEC call MakeNewPSPEC()
|
||||
|
||||
augroup NewPSPEC
|
||||
au!
|
||||
autocmd BufNewFile pspec.xml call MakeNewPSPEC()
|
||||
augroup END
|
||||
|
||||
" vim: set et foldmethod=marker : "
|
||||
@@ -0,0 +1,32 @@
|
||||
" Vim plugin
|
||||
" Purpose: Intelligently create content for PISI's translations.xml files
|
||||
" Author: İnanç Yıldırgan
|
||||
" Copyright: Copyright (c) 2008 İnanç Yıldırgan
|
||||
" Licence: You may redistribute this under the terms of the GNU GPL v2..
|
||||
|
||||
if &compatible || v:version < 603
|
||||
finish
|
||||
endif
|
||||
|
||||
fun! MakeNewTranslations()
|
||||
set nopaste
|
||||
|
||||
0 put = '<?xml version=\"1.0\" ?>'
|
||||
put = '<PISI>'
|
||||
put = ' <Source>'
|
||||
put = ' <Name></Name>'
|
||||
put = ' <Summary xml:lang=\"\"></Summary>'
|
||||
put = ' <Description xml:lang=\"\"></Description>'
|
||||
put = ' </Source>'
|
||||
put = '</PISI>'
|
||||
14
|
||||
endfun
|
||||
|
||||
com! -nargs=0 MakeNewTranslations call MakeNewTranslations()
|
||||
|
||||
augroup MakeNewTranslations
|
||||
au!
|
||||
autocmd BufNewFile translations.xml call MakeNewTranslations()
|
||||
augroup END
|
||||
|
||||
" vim: set et foldmethod=marker : "
|
||||
@@ -0,0 +1,19 @@
|
||||
diff -Nur vim72-old/runtime/syntax/xf86conf.vim vim72/runtime/syntax/xf86conf.vim
|
||||
--- vim72-old/runtime/syntax/xf86conf.vim 2008-10-18 01:14:23.000000000 +0300
|
||||
+++ vim72/runtime/syntax/xf86conf.vim 2008-10-18 01:16:12.000000000 +0300
|
||||
@@ -68,6 +68,7 @@
|
||||
syn region xf86confSectionMonitor matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Monitor\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSectionModes matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Modes\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment
|
||||
syn region xf86confSectionScreen matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Screen\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionDisplay,xf86confComment,xf86confOption,xf86confKeyword
|
||||
+ syn region xf86confSectionExtensions matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Extensions\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSubSectionAny matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"[^\"]\+\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,@xf86confSectionErrors
|
||||
syn region xf86confSubSectionMode matchgroup=xf86confSectionDelim start="^\s*Mode\s\+\"[^\"]\+\"" end="^\s*EndMode\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confKeyword,@xf86confSectionErrors
|
||||
syn region xf86confSubSectionDisplay matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"Display\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,@xf86confSectionErrors
|
||||
@@ -174,6 +175,7 @@
|
||||
endif
|
||||
syn sync match xf86confSyncSectionMonitor groupthere xf86confSectionMonitor "^\s*Section\s\+\"Monitor\""
|
||||
syn sync match xf86confSyncSectionScreen groupthere xf86confSectionScreen "^\s*Section\s\+\"Screen\""
|
||||
+syn sync match xf86confSyncSectionExtensions groupthere xf86confSectionExtensions "^\s*Section\s\+\"Extensions\""
|
||||
syn sync match xf86confSyncEndSection groupthere NONE "^\s*End_*Section\s*$"
|
||||
|
||||
" Define the default highlighting
|
||||
@@ -0,0 +1,428 @@
|
||||
" To use this file, add this line to your ~/.vimrc:, w/o the dquote
|
||||
" source /path/to/kde/sources/kdesdk/scripts/kde-devel-vim.vim
|
||||
"
|
||||
" For CreateChangeLogEntry() : If you don't want to re-enter your
|
||||
" Name/Email in each vim session then make sure to have the viminfo
|
||||
" option enabled in your ~/.vimrc, with the '!' flag, enabling persistent
|
||||
" storage of global variables. Something along the line of
|
||||
" set viminfo=%,!,'50,\"100,:100,n~/.viminfo
|
||||
" should do the trick.
|
||||
|
||||
" Don't include these in filename completions
|
||||
set suffixes+=.lo,.o,.moc,.la,.closure,.loT
|
||||
|
||||
" Search for headers here
|
||||
set path=.,/usr/include,/usr/local/include,
|
||||
if $QTDIR != ''
|
||||
let &path = &path . $QTDIR . '/include/,'
|
||||
endif
|
||||
if $KDEDIR != ''
|
||||
let &path = &path . $KDEDIR . '/include/,'
|
||||
let &path = &path . $KDEDIR . '/include/arts/,'
|
||||
endif
|
||||
if $KDEDIRS != ''
|
||||
let &path = &path . substitute( $KDEDIRS, '\(:\|$\)', '/include,', 'g' )
|
||||
let &path = &path . substitute( $KDEDIRS, '\(:\|$\)', '/include/arts,', 'g' )
|
||||
endif
|
||||
set path+=,
|
||||
|
||||
" Use makeobj to build
|
||||
set mp=makeobj
|
||||
|
||||
" If TagList is Loaded then get a funny statusline
|
||||
" Only works if kde-devel-vim.vim is loaded after taglist.
|
||||
" Droping this script in ~/.vim/plugin works fine
|
||||
if exists('loaded_taglist')
|
||||
let Tlist_Process_File_Always=1
|
||||
set statusline=%<%f:[\ %{Tlist_Get_Tag_Prototype_By_Line()}\ ]\ %h%m%r%=%-14.(%l,%c%V%)\ %P
|
||||
endif
|
||||
|
||||
" Insert tab character in whitespace-only lines, complete otherwise
|
||||
inoremap <Tab> <C-R>=SmartTab()<CR>
|
||||
|
||||
if exists("EnableSmartParens")
|
||||
" Insert a space after ( or [ and before ] or ) unless preceded by a matching
|
||||
" paren/bracket or space or inside a string or comment. Comments are only
|
||||
" recognized as such if they start on the current line :-(
|
||||
inoremap ( <C-R>=SmartParens( '(' )<CR>
|
||||
inoremap [ <C-R>=SmartParens( '[' )<CR>
|
||||
inoremap ] <C-R>=SmartParens( ']', '[' )<CR>
|
||||
inoremap ) <C-R>=SmartParens( ')', '(' )<CR>
|
||||
endif
|
||||
|
||||
" Insert an #include statement for the current/last symbol
|
||||
inoremap <F5> <C-O>:call AddHeader()<CR>
|
||||
|
||||
" Insert a forward declaration for the current/last symbol
|
||||
" FIXME: not implemented yet
|
||||
" inoremap <S-F5> <C-O>:call AddForward()<CR>
|
||||
|
||||
" Switch between header and implementation files on ,h
|
||||
nmap <silent> ,h :call SwitchHeaderImpl()<CR>
|
||||
|
||||
" Comment selected lines on ,c in visual mode
|
||||
vmap ,c :s,^,//X ,<CR>:noh<CR>
|
||||
" Uncomment selected lines on ,u in visual mode
|
||||
vmap ,u :s,^//X ,,<CR>
|
||||
|
||||
" Insert an include guard based on the file name on ,i
|
||||
nmap ,i :call IncludeGuard()<CR>o
|
||||
|
||||
" Insert simple debug statements into each method
|
||||
nmap ,d :call InsertMethodTracer()<CR>
|
||||
|
||||
" Expand #i to #include <.h> or #include ".h". The latter is chosen
|
||||
" if the character typed after #i is a dquote
|
||||
" If the character is > #include <> is inserted (standard C++ headers w/o .h)
|
||||
iab #i <C-R>=SmartInclude()<CR>
|
||||
|
||||
" Insert a stripped down CVS diff
|
||||
iab DIFF <Esc>:call RunDiff()<CR>
|
||||
|
||||
" mark 'misplaced' tab characters
|
||||
set listchars=tab:·\ ,trail:·
|
||||
set list
|
||||
|
||||
set incsearch
|
||||
|
||||
function! SmartTab()
|
||||
let col = col('.') - 1
|
||||
if !col || getline('.')[col-1] !~ '\k'
|
||||
return "\<Tab>"
|
||||
else
|
||||
return "\<C-P>"
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! SmartParens( char, ... )
|
||||
if ! ( &syntax =~ '^\(c\|cpp\|java\)$' )
|
||||
return a:char
|
||||
endif
|
||||
let s = strpart( getline( '.' ), 0, col( '.' ) - 1 )
|
||||
if s =~ '//'
|
||||
return a:char
|
||||
endif
|
||||
let s = substitute( s, '/\*\([^*]\|\*\@!/\)*\*/', '', 'g' )
|
||||
let s = substitute( s, "'[^']*'", '', 'g' )
|
||||
let s = substitute( s, '"\(\\"\|[^"]\)*"', '', 'g' )
|
||||
if s =~ "\\([\"']\\|/\\*\\)"
|
||||
return a:char
|
||||
endif
|
||||
if a:0 > 0
|
||||
if strpart( getline( '.' ), col( '.' ) - 3, 2 ) == a:1 . ' '
|
||||
return "\<BS>" . a:char
|
||||
endif
|
||||
if strpart( getline( '.' ), col( '.' ) - 2, 1 ) == ' '
|
||||
return a:char
|
||||
endif
|
||||
return ' ' . a:char
|
||||
endif
|
||||
if a:char == '('
|
||||
if strpart( getline( '.' ), col( '.' ) - 3, 2 ) == 'if' ||
|
||||
\strpart( getline( '.' ), col( '.' ) - 4, 3 ) == 'for' ||
|
||||
\strpart( getline( '.' ), col( '.' ) - 6, 5 ) == 'while' ||
|
||||
\strpart( getline( '.' ), col( '.' ) - 7, 6 ) == 'switch'
|
||||
return ' ( '
|
||||
endif
|
||||
endif
|
||||
return a:char . ' '
|
||||
endfunction
|
||||
|
||||
function! SwitchHeaderImpl()
|
||||
let headers = '\.\([hH]\|hpp\|hxx\)$'
|
||||
let impl = '\.\([cC]\|cpp\|cc\|cxx\)$'
|
||||
let fn = expand( '%' )
|
||||
if fn =~ headers
|
||||
let list = glob( substitute( fn, headers, '.*', '' ) )
|
||||
elseif fn =~ impl
|
||||
let list = glob( substitute( fn, impl, '.*', '' ) )
|
||||
endif
|
||||
while strlen( list ) > 0
|
||||
let file = substitute( list, "\n.*", '', '' )
|
||||
let list = substitute( list, "[^\n]*", '', '' )
|
||||
let list = substitute( list, "^\n", '', '' )
|
||||
if ( fn =~ headers && file =~ impl ) || ( fn =~ impl && file =~ headers )
|
||||
execute( "edit " . file )
|
||||
return
|
||||
endif
|
||||
endwhile
|
||||
echohl ErrorMsg
|
||||
echo "File switch failed!"
|
||||
echohl None
|
||||
endfunction
|
||||
|
||||
function! IncludeGuard()
|
||||
let guard = toupper( substitute( expand( '%' ), '\([^.]*\)\.h', '\1_h', '' ) )
|
||||
call append( '^', '#define ' . guard )
|
||||
+
|
||||
call append( '^', '#ifndef ' . guard )
|
||||
call append( '$', '#endif // ' . guard )
|
||||
+
|
||||
endfunction
|
||||
|
||||
function! SmartInclude()
|
||||
let next = nr2char( getchar( 0 ) )
|
||||
if next == '"'
|
||||
return "#include \".h\"\<Left>\<Left>\<Left>"
|
||||
endif
|
||||
if next == '>'
|
||||
return "#include <>\<Left>"
|
||||
endif
|
||||
return "#include <.h>\<Left>\<Left>\<Left>"
|
||||
endfunction
|
||||
|
||||
function! MapIdentHeader( ident )
|
||||
" Qt stuff
|
||||
if a:ident =~ 'Q.*Layout'
|
||||
return '<qlayout.h>'
|
||||
elseif a:ident == 'QListViewItem' ||
|
||||
\a:ident == 'QCheckListItem' ||
|
||||
\a:ident == 'QListViewItemIterator'
|
||||
return '<qlistview.h>'
|
||||
elseif a:ident == 'QIconViewItem' ||
|
||||
\a:ident == 'QIconDragItem' ||
|
||||
\a:ident == 'QIconDrag'
|
||||
return '<qiconview.h>'
|
||||
elseif a:ident =~ 'Q.*Drag' ||
|
||||
\a:ident == 'QDragManager'
|
||||
return '<qdragobject.h>'
|
||||
elseif a:ident == 'QMimeSource' ||
|
||||
\a:ident == 'QMimeSourceFactory' ||
|
||||
\a:ident == 'QWindowsMime'
|
||||
return '<qmime.h>'
|
||||
elseif a:ident == 'QPtrListIterator'
|
||||
return '<qptrlist.h>'
|
||||
elseif a:ident =~ 'Q.*Event'
|
||||
return '<qevent.h>'
|
||||
elseif a:ident == 'QTime' ||
|
||||
\a:ident == 'QDate'
|
||||
return '<qdatetime.h>'
|
||||
elseif a:ident == 'QTimeEdit' ||
|
||||
\a:ident == 'QDateTimeEditBase' ||
|
||||
\a:ident == 'QDateEdit'
|
||||
return '<qdatetimeedit.h>'
|
||||
elseif a:ident == 'QByteArray'
|
||||
return '<qcstring.h>'
|
||||
elseif a:ident == 'QWidgetListIt'
|
||||
return '<qwidgetlist.h>'
|
||||
elseif a:ident == 'QTab'
|
||||
return '<qtabbar.h>'
|
||||
elseif a:ident == 'QColorGroup'
|
||||
return '<qpalette.h>'
|
||||
elseif a:ident == 'QActionGroup'
|
||||
return '<qaction.h>'
|
||||
elseif a:ident =~ 'Q.*Validator'
|
||||
return '<qvalidator.h>'
|
||||
elseif a:ident =~ 'QListBox.*'
|
||||
return '<qlistbox.h>'
|
||||
elseif a:ident == 'QChar' ||
|
||||
\a:ident == 'QCharRef' ||
|
||||
\a:ident == 'QConstString'
|
||||
return '<qstring.h>'
|
||||
elseif a:ident =~ 'QCanvas.*'
|
||||
return '<qcanvas.h>'
|
||||
elseif a:ident =~ 'QGL.*'
|
||||
return '<qgl.h>'
|
||||
elseif a:ident == 'QTableSelection' ||
|
||||
\a:ident == 'QTableItem' ||
|
||||
\a:ident == 'QComboTableItem' ||
|
||||
\a:ident == 'QCheckTableItem'
|
||||
return '<qtable.h>'
|
||||
elseif a:ident == 'qApp'
|
||||
return '<qapplication.h>'
|
||||
|
||||
" KDE stuff
|
||||
elseif a:ident == 'K\(Double\|Int\)\(NumInput\|SpinBox\)'
|
||||
return '<knuminput.h>'
|
||||
elseif a:ident == 'KConfigGroup'
|
||||
return '<kconfigbase.h>'
|
||||
elseif a:ident == 'KListViewItem'
|
||||
return '<klistview.h>'
|
||||
elseif a:ident =~ 'kd\(Debug\|Warning\|Error\|Fatal\|Backtrace\)'
|
||||
return '<kdebug.h>'
|
||||
elseif a:ident == 'kapp'
|
||||
return '<kapplication.h>'
|
||||
elseif a:ident == 'i18n' ||
|
||||
\a:ident == 'I18N_NOOP'
|
||||
return '<klocale.h>'
|
||||
elseif a:ident == 'locate' ||
|
||||
\a:ident == 'locateLocal'
|
||||
return '<kstandarddirs.h>'
|
||||
|
||||
" aRts stuff
|
||||
elseif a:ident =~ '\arts_\(debug\|info\|warning\|fatal\)'
|
||||
return '<debug.h>'
|
||||
|
||||
" Standard Library stuff
|
||||
elseif a:ident =~ '\(std::\)\?\(cout\|cerr\|endl\)'
|
||||
return '<iostream>'
|
||||
elseif a:ident =~ '\(std::\)\?is\(alnum\|alpha\|ascii\|blank\|graph\|lower\|print\|punct\|space\|upper\|xdigit\)'
|
||||
return '<cctype>'
|
||||
endif
|
||||
|
||||
let header = tolower( substitute( a:ident, '::', '/', 'g' ) ) . '.h'
|
||||
let check = header
|
||||
while 1
|
||||
if filereadable( check )
|
||||
return '"' . check . '"'
|
||||
endif
|
||||
let slash = match( check, '/' )
|
||||
if slash == -1
|
||||
return '<' . header . '>'
|
||||
endif
|
||||
let check = strpart( check, slash + 1 )
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
" This is a rather dirty hack, but seems to work somehow :-) (malte)
|
||||
function! AddHeader()
|
||||
let s = getline( '.' )
|
||||
let i = col( '.' ) - 1
|
||||
while i > 0 && strpart( s, i, 1 ) !~ '[A-Za-z0-9_:]'
|
||||
let i = i - 1
|
||||
endwhile
|
||||
while i > 0 && strpart( s, i, 1 ) =~ '[A-Za-z0-9_:]'
|
||||
let i = i - 1
|
||||
endwhile
|
||||
let start = match( s, '[A-Za-z0-9_]\+\(::[A-Za-z0-9_]\+\)*', i )
|
||||
let end = matchend( s, '[A-Za-z0-9_]\+\(::[A-Za-z0-9_]\+\)*', i )
|
||||
if end > col( '.' )
|
||||
let end = matchend( s, '[A-Za-z0-9_]\+', i )
|
||||
endif
|
||||
let ident = strpart( s, start, end - start )
|
||||
let include = '#include ' . MapIdentHeader( ident )
|
||||
|
||||
let line = 1
|
||||
let incomment = 0
|
||||
let appendpos = 0
|
||||
let codestart = 0
|
||||
while line <= line( '$' )
|
||||
let s = getline( line )
|
||||
if incomment == 1
|
||||
let end = matchend( s, '\*/' )
|
||||
if end == -1
|
||||
let line = line + 1
|
||||
continue
|
||||
else
|
||||
let s = strpart( s, end )
|
||||
let incomment = 0
|
||||
endif
|
||||
endif
|
||||
let s = substitute( s, '//.*', '', '' )
|
||||
let s = substitute( s, '/\*\([^*]\|\*\@!/\)*\*/', '', 'g' )
|
||||
if s =~ '/\*'
|
||||
let incomment = 1
|
||||
elseif s =~ '^' . include
|
||||
break
|
||||
elseif s =~ '^#include' && s !~ '\.moc"'
|
||||
let appendpos = line
|
||||
elseif codestart == 0 && s !~ '^$'
|
||||
let codestart = line
|
||||
endif
|
||||
let line = line + 1
|
||||
endwhile
|
||||
if line == line( '$' ) + 1
|
||||
if appendpos == 0
|
||||
call append( codestart - 1, include )
|
||||
call append( codestart, '' )
|
||||
else
|
||||
call append( appendpos, include )
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! RunDiff()
|
||||
echo 'Diffing....'
|
||||
read! cvs diff -bB -I \\\#include | egrep -v '(^Index:|^=+$|^RCS file:|^retrieving revision|^diff -u|^[+-]{3})'
|
||||
endfunction
|
||||
|
||||
function! CreateChangeLogEntry()
|
||||
let currentBuffer = expand( "%" )
|
||||
|
||||
if exists( "g:EMAIL" )
|
||||
let mail = g:EMAIL
|
||||
elseif exists( "$EMAIL" )
|
||||
let mail = $EMAIL
|
||||
else
|
||||
let mail = inputdialog( "Enter Name/Email for Changelog entry: " )
|
||||
if mail == ""
|
||||
echo "Aborted ChangeLog edit..."
|
||||
return
|
||||
endif
|
||||
let g:EMAIL = mail
|
||||
endif
|
||||
|
||||
if bufname( "ChangeLog" ) != "" && bufwinnr( bufname( "ChangeLog" ) ) != -1
|
||||
execute bufwinnr( bufname( "ChangeLog" ) ) . " wincmd w"
|
||||
else
|
||||
execute "split ChangeLog"
|
||||
endif
|
||||
|
||||
let lastEntry = getline( nextnonblank( 1 ) )
|
||||
let newEntry = strftime("%Y-%m-%d") . " " . mail
|
||||
|
||||
if lastEntry != newEntry
|
||||
call append( 0, "" )
|
||||
call append( 0, "" )
|
||||
call append( 0, newEntry )
|
||||
endif
|
||||
|
||||
" like emacs, prepend the current buffer name to the entry. but unlike
|
||||
" emacs I have no idea how to figure out the current function name :(
|
||||
" (Simon)
|
||||
if currentBuffer != ""
|
||||
let newLine = "\t* " . currentBuffer . ": "
|
||||
else
|
||||
let newLine = "\t* "
|
||||
endif
|
||||
|
||||
call append( 2, newLine )
|
||||
|
||||
execute "normal 3G$"
|
||||
endfunction
|
||||
|
||||
function! AddQtSyntax()
|
||||
if expand( "<amatch>" ) == "cpp"
|
||||
syn keyword qtKeywords signals slots emit foreach
|
||||
syn keyword qtMacros Q_OBJECT Q_WIDGET Q_PROPERTY Q_ENUMS Q_OVERRIDE Q_CLASSINFO Q_SETS SIGNAL SLOT
|
||||
syn keyword qtCast qt_cast qobject_cast qvariant_cast qstyleoption_cast
|
||||
syn keyword qtTypedef uchar uint ushort ulong Q_INT8 Q_UINT8 Q_INT16 Q_UINT16 Q_INT32 Q_UINT32 Q_LONG Q_ULONG Q_INT64 Q_UINT64 Q_LLONG Q_ULLONG pchar puchar pcchar qint8 quint8 qint16 quint16 qint32 quint32 qint64 quint64 qlonglong qulonglong
|
||||
syn keyword kdeKeywords k_dcop k_dcop_signals
|
||||
syn keyword kdeMacros K_DCOP ASYNC
|
||||
syn keyword cRepeat foreach
|
||||
syn keyword cRepeat forever
|
||||
|
||||
hi def link qtKeywords Statement
|
||||
hi def link qtMacros Type
|
||||
hi def link qtCast Statement
|
||||
hi def link qtTypedef Type
|
||||
hi def link kdeKeywords Statement
|
||||
hi def link kdeMacros Type
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! InsertMethodTracer()
|
||||
:normal [[kf(yBjokdDebug() << ""()" << endl;
|
||||
endfunction
|
||||
|
||||
function! UpdateMocFiles()
|
||||
if &syntax == "cpp"
|
||||
let i = 1
|
||||
while i < 80
|
||||
let s = getline( i )
|
||||
if s =~ '^#include ".*\.moc"'
|
||||
let s = substitute( s, '.*"\(.*\)\.moc"', '\1.h', '' )
|
||||
if stridx( &complete, s ) == -1
|
||||
let &complete = &complete . ',k' . s
|
||||
endif
|
||||
break
|
||||
endif
|
||||
let i = i + 1
|
||||
endwhile
|
||||
endif
|
||||
endfunction
|
||||
|
||||
autocmd Syntax * call AddQtSyntax()
|
||||
autocmd CursorHold * call UpdateMocFiles()
|
||||
|
||||
" vim: sw=4 sts=4 et
|
||||
@@ -0,0 +1,28 @@
|
||||
"
|
||||
" Just a little plugin to automatically set utf-8 for new Python files
|
||||
"
|
||||
|
||||
if &compatible || v:version < 603
|
||||
finish
|
||||
endif
|
||||
|
||||
fun! MakeNewPythonFile()
|
||||
" actions.py has another handler
|
||||
if expand("<afile>") == 'actions.py'
|
||||
return
|
||||
endif
|
||||
set nopaste
|
||||
0 put = '#!/usr/bin/python'
|
||||
put = '# -*- coding: utf-8 -*-'
|
||||
put = ''
|
||||
5
|
||||
endfun
|
||||
|
||||
com! -nargs=0 NewPythonFile call MakeNewPythonFile()
|
||||
|
||||
augroup NewPythonFile
|
||||
au!
|
||||
autocmd BufNewFile *.py call MakeNewPythonFile()
|
||||
augroup END
|
||||
|
||||
" vim: set et foldmethod=marker : "
|
||||
@@ -0,0 +1,26 @@
|
||||
" Vim color file
|
||||
" Maintainer: Connor Berry <connorberry@yahoo.com>
|
||||
" Last Change: 2006/05/25
|
||||
" Version: 1.0
|
||||
|
||||
set background=dark
|
||||
highlight clear
|
||||
if exists("syntax on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name = "redstring"
|
||||
|
||||
highlight Normal term=none ctermfg=grey cterm=none ctermbg=black guifg=white gui=none guibg=black
|
||||
highlight Comment term=none ctermfg=DarkGrey guifg=DarkGrey
|
||||
highlight Constant term=none ctermfg=red cterm=none guifg=red gui=none
|
||||
highlight Special term=none ctermfg=red cterm=bold guifg=red gui=bold
|
||||
highlight Identifier term=none ctermfg=lightgreen cterm=none guifg=lightgreen gui=none
|
||||
highlight Statement term=bold ctermfg=cyan cterm=bold guifg=cyan gui=bold
|
||||
highlight Operator term=bold ctermfg=cyan cterm=bold guifg=cyan gui=bold
|
||||
highlight PreProc term=bold ctermfg=lightgreen cterm=none guifg=green gui=none
|
||||
highlight Type term=bold ctermfg=lightgreen cterm=none guifg=lightgreen gui=none
|
||||
highlight String term=none ctermfg=red cterm=none guifg=red gui=none
|
||||
highlight Number term=none ctermfg=red cterm=none guifg=red gui=none
|
||||
|
||||
" vim:ts=2:sw=2:et
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
--- vim70c/src/structs.h.warning1 2006-04-04 15:58:16.000000000 +0200
|
||||
+++ vim70c/src/structs.h 2006-04-04 15:58:20.000000000 +0200
|
||||
@@ -1082,7 +1082,7 @@
|
||||
{
|
||||
typval_T di_tv; /* type and value of the variable */
|
||||
char_u di_flags; /* flags (only used for variable) */
|
||||
- char_u di_key[1]; /* key (actually longer!) */
|
||||
+ char_u di_key[10]; /* key (actually longer!) */
|
||||
};
|
||||
|
||||
typedef struct dictitem_S dictitem_T;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -ru vim73.orig/src/link.sh vim73/src/link.sh
|
||||
--- vim73.orig/src/link.sh 2010-10-21 16:29:07 +0200
|
||||
+++ vim73/src/link.sh 2010-10-21 16:23:15 +0200
|
||||
@@ -41,7 +41,7 @@
|
||||
if sh link.cmd; then
|
||||
touch auto/link.sed
|
||||
cp link.cmd linkit.sh
|
||||
- for libname in SM ICE nsl dnet dnet_stub inet socket dir elf iconv Xt Xmu Xp Xpm X11 Xdmcp x w perl dl pthread thread readline m crypt attr; do
|
||||
+ for libname in dummy; do
|
||||
cont=yes
|
||||
while test -n "$cont"; do
|
||||
if grep "l$libname " linkit.sh >/dev/null; then
|
||||
@@ -0,0 +1,25 @@
|
||||
--- runtime/ftplugin/xml.vim.orig 2010-05-15 14:04:03.000000000 +0300
|
||||
+++ runtime/ftplugin/xml.vim 2010-08-21 01:12:43.218840497 +0300
|
||||
@@ -13,13 +13,6 @@
|
||||
set cpo-=C
|
||||
|
||||
setlocal commentstring=<!--%s-->
|
||||
-setlocal comments=s:<!--,m:\ \ \ \ \ ,e:-->
|
||||
-
|
||||
-setlocal formatoptions-=t
|
||||
-if !exists("g:ft_xml_autocomment") || (g:ft_xml_autocomment == 1)
|
||||
- setlocal formatoptions+=croql
|
||||
-endif
|
||||
-
|
||||
|
||||
" XML: thanks to Johannes Zellner and Akbar Ibrahim
|
||||
" - case sensitive
|
||||
@@ -56,7 +49,7 @@
|
||||
endif
|
||||
|
||||
" Undo the stuff we changed.
|
||||
-let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" .
|
||||
+let b:undo_ftplugin = "setlocal cms<" .
|
||||
\ " | unlet! b:match_ignorecase b:match_words b:browsefilter"
|
||||
|
||||
" Restore the saved compatibility options.
|
||||
@@ -0,0 +1,117 @@
|
||||
" Default configuration file for Vim
|
||||
" Written by Aron Griffis <agriffis@gentoo.org>
|
||||
" Modified by Ryan Phillips <rphillips@gentoo.org>
|
||||
" Added Redhat's vimrc info by Seemant Kulleen <seemant@gentoo.org>
|
||||
" Added some enhancements by A. Murat Eren <meren@uludag.org.tr>
|
||||
" Tidy up by Onur Küçük <onur@pardus.org.tr>
|
||||
|
||||
" The following are some sensible defaults for Vim for most users.
|
||||
" We attempt to change as little as possible from Vim's defaults,
|
||||
" deviating only where it makes sense
|
||||
|
||||
set nocompatible " Turn off compability mode with Vi, makes Vim more powerful
|
||||
set backspace=2 " same as :set backspace=indent,eol,start
|
||||
set autoindent " Always set auto-indenting on
|
||||
|
||||
set viminfo='20,\"50 " Read/write a .viminfo file -- limit to only 50
|
||||
set history=100 " Keep 100 lines of command history
|
||||
set ruler " Show the cursor position all the time
|
||||
set showmode " Show current mode
|
||||
|
||||
" Always enable syntax & last search highlighting
|
||||
syntax enable
|
||||
set shiftwidth=4 " Number of spaces to use for each step of (auto)indentF
|
||||
set wrap " wrap long lines to windows width
|
||||
set linebreak
|
||||
set laststatus=2
|
||||
set showcmd
|
||||
set wildmenu
|
||||
|
||||
set incsearch " shows the match while typing
|
||||
set hlsearch " highlight found searches
|
||||
set background=dark
|
||||
set modelines=0
|
||||
|
||||
" Vi is cooler with these settings :)
|
||||
set ts=4
|
||||
set sta
|
||||
set sts=4
|
||||
set expandtab
|
||||
|
||||
if v:lang =~ "^ko"
|
||||
set fileencodings=euc-kr
|
||||
set guifontset=-*-*-medium-r-normal--16-*-*-*-*-*-*-*
|
||||
elseif v:lang =~ "^ja_JP"
|
||||
set fileencodings=euc-jp
|
||||
set guifontset=-misc-fixed-medium-r-normal--14-*-*-*-*-*-*-*
|
||||
elseif v:lang =~ "^zh_TW"
|
||||
set fileencodings=big5
|
||||
set guifontset=-sony-fixed-medium-r-normal--16-150-75-75-c-80-iso8859-1,-taipei-fixed-medium-r-normal--16-150-75-75-c-160-big5-0
|
||||
elseif v:lang =~ "^zh_CN"
|
||||
set fileencodings=gb2312
|
||||
set guifontset=*-r-*
|
||||
endif
|
||||
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
|
||||
set fileencodings=utf-8,latin1
|
||||
endif
|
||||
|
||||
" Only do this part when compiled with support for autocommands
|
||||
if has("autocmd")
|
||||
" In text files, always limit the width of text to 78 characters
|
||||
autocmd BufRead *.txt set tw=78
|
||||
" When editing a file, always jump to the last cursor position
|
||||
autocmd BufReadPost *
|
||||
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
|
||||
\ exe "normal g'\"" |
|
||||
\ endif
|
||||
endif
|
||||
|
||||
" Don't use Ex mode, use Q for formatting
|
||||
map Q gq
|
||||
|
||||
if &term=="xterm"
|
||||
set t_RV= " don't check terminal version
|
||||
set t_Co=8
|
||||
set t_Sb=^[4%dm
|
||||
set t_Sf=^[3%dm
|
||||
endif
|
||||
|
||||
" some extra commands for HTML editing
|
||||
nmap ,mh wbgueyei<<ESC>ea></<ESC>pa><ESC>bba
|
||||
nmap ,h1 _i<h1><ESC>A</h1><ESC>
|
||||
nmap ,h2 _i<h2><ESC>A</h2><ESC>
|
||||
nmap ,h3 _i<h3><ESC>A</h3><ESC>
|
||||
nmap ,h4 _i<h4><ESC>A</h4><ESC>
|
||||
nmap ,h5 _i<h5><ESC>A</h5><ESC>
|
||||
nmap ,h6 _i<h6><ESC>A</h6><ESC>
|
||||
nmap ,hb wbi<b><ESC>ea</b><ESC>bb
|
||||
nmap ,he wbi<em><ESC>ea</em><ESC>bb
|
||||
nmap ,hi wbi<i><ESC>ea</i><ESC>bb
|
||||
nmap ,hu wbi<u><ESC>ea</i><ESC>bb
|
||||
nmap ,hs wbi<strong><ESC>ea</strong><ESC>bb
|
||||
nmap ,ht wbi<tt><ESC>ea</tt><ESC>bb
|
||||
nmap ,hx wbF<df>f<df>
|
||||
|
||||
" Enable this to automatically put extra space after ([ and before ])
|
||||
" This comes from kde-devel-vim.vim plugin
|
||||
" let EnableSmartParens=1
|
||||
|
||||
nmap <C-N><C-N> :set invnumber <CR>
|
||||
nmap <C-T> :Tlist <CR>
|
||||
|
||||
" Enables to move upward/downward at long lines
|
||||
map <UP> gk
|
||||
map <DOWN> gj
|
||||
map k gk
|
||||
map j gj
|
||||
|
||||
" Taglist defaults
|
||||
let Tlist_Use_Right_Window=1
|
||||
let Tlist_WinWidth=40
|
||||
let Tlist_Exit_OnlyWindow=1
|
||||
let Tlist_File_Fold_Auto_Close=1
|
||||
|
||||
" Enable filetype stuff
|
||||
filetype plugin indent on
|
||||
|
||||
|
||||
Reference in New Issue
Block a user