This is my .vimrc file:
1 set nu
2 set laststatus=2
3
4 function! PHP_Cursor_Position()
5 let pos = getpos(".")
6 let curline = pos[1]
7 let win = winsaveview()
8 let decl = ""
9 let startline =
search('^\s*\(static\|public\|private\)\=\s*\(static\|public\|private\)\=\s*\(static\|public\|private\)\=\s*\(function\|class\)\s*&\=\w\+','cbW')
10 call search('{','cW')
11 sil exe "normal %"
12 let endline = line(".")
13 if curline >= startline && curline <= endline
14 let decl = getline(startline)
15 endif
16 call cursor(pos)
17 call winrestview(win)
18 return decl
19 endfunction
20
21 set statusline=%{PHP_Cursor_Position()}
22
Just opening .vimrc and leaving the curso at the opening position
makes the console bell ring repeatedly. What might be the problem? I
also have these plugins and files installed:
✈saturn:.vim$ pwd
/home/dotancohen/.vim
✈saturn:.vim$ tree
.
├── doc
│ ├── taglist.txt
│ └── tags
├── keymap
│ └── insert-only_capslock.vim
├── mytags
│ └── framework
├── plugin
│ ├── ctags.vim
│ └── taglist.vim
└── spell
This is on Kubuntu 11.10. Does anyone have any idea what the problem might be?
Thank you!
--
Dotan Cohen
http://gibberish.co.il
http://what-is-what.com
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php