~ubuntu-branches/ubuntu/maverick/vim/maverick

« back to all changes in this revision

Viewing changes to runtime/ftplugin/vim.vim

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-05-04 11:13:42 UTC
  • mfrom: (1.1.8 upstream) (0.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090504111342-60miqybsixdpc345
Tags: 2:7.2.148-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/runtime/vimrc: "syntax on" is a sane default for non-tiny vim.
  - runtime/syntax/debcontrol.vim:
    + Add "metapackages" to the list of valid sections.
  - runtime/syntax/grub.vim:
    + Add Ubuntu-specific 'quiet' keyword.
  - Drop vim-lesstif package and lesstif2-dev build-dependency.
  - Enable Python interpreter on basic builds.
  - Disable autoindent, line-wrapping, and backup files by default.
* Dropped changes, merged in Debian:
  - Add jaunty, karmic to the list of valid suites.
  - runtime/syntax/debsources.vim:
    + Add "jaunty" to debsourcesDistrKeyword
  - Create a .pot file for translations.
* Drop gutsy from the list of valid distro series, it's been EOLed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
" Vim filetype plugin
2
2
" Language:     Vim
3
3
" Maintainer:   Bram Moolenaar <Bram@vim.org>
4
 
" Last Change:  2008 Feb 27
 
4
" Last Change:  2009 Jan 22
5
5
 
6
6
" Only do this when not done yet for this buffer
7
7
if exists("b:did_ftplugin")
11
11
" Don't load another plugin for this buffer
12
12
let b:did_ftplugin = 1
13
13
 
14
 
let cpo_save = &cpo
 
14
let s:cpo_save = &cpo
15
15
set cpo-=C
16
16
 
17
 
let b:undo_ftplugin = "setl fo< com< tw< commentstring<"
 
17
let b:undo_ftplugin = "setl fo< isk< com< tw< commentstring<"
18
18
        \ . "| unlet! b:match_ignorecase b:match_words b:match_skip"
19
19
 
20
20
" Set 'formatoptions' to break comment lines but not other lines,
21
21
" and insert the comment leader when hitting <CR> or using "o".
22
22
setlocal fo-=t fo+=croql
23
23
 
 
24
" To allow tag lookup via CTRL-] for autoload functions, '#' must be a
 
25
" keyword character.  E.g., for netrw#Nread().
 
26
setlocal isk+=#
 
27
 
24
28
" Set 'comments' to format dashed lists in comments
25
29
setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\"
26
30
 
53
57
  let b:match_ignorecase = 0
54
58
  let b:match_words =
55
59
        \ '\<fu\%[nction]\>:\<retu\%[rn]\>:\<endf\%[unction]\>,' .
56
 
        \ '\<wh\%[ile]\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<endw\%[hile]\>,' .
57
 
        \ '\<for\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<endfo\%[r]\>,' .
 
60
        \ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' .
58
61
        \ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
59
62
        \ '\<try\>:\<cat\%[ch]\>:\<fina\%[lly]\>:\<endt\%[ry]\>,' .
60
63
        \ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' .
64
67
        \ synIDattr(synID(line("."),col("."),1),"name") =~? "comment\\|string"'
65
68
endif
66
69
 
67
 
let &cpo = cpo_save
 
70
let &cpo = s:cpo_save
 
71
unlet s:cpo_save
68
72
 
69
73
" removed this, because 'cpoptions' is a global option.
70
74
" setlocal cpo+=M               " makes \%( match \)