annotate runtime/ftplugin/icon.vim @ 31164:7831da568864 v9.0.0916

patch 9.0.0916: getbufline() is inefficient for getting a single line Commit: https://github.com/vim/vim/commit/ce30ccc06af7f2c03762e5b18dde37b26ea6ec42 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Nov 21 19:57:04 2022 +0000 patch 9.0.0916: getbufline() is inefficient for getting a single line Problem: getbufline() is inefficient for getting a single line. Solution: Add getbufoneline().
author Bram Moolenaar <Bram@vim.org>
date Mon, 21 Nov 2022 21:00:06 +0100
parents 1e9e9d89f0ee
children 8ae680be2a51
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim filetype plugin file
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: Icon
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Last Change: 2022 Jun 16
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 if exists("b:did_ftplugin")
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 finish
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 endif
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 let b:did_ftplugin = 1
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 let s:cpo_save = &cpo
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 set cpo&vim
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 setlocal comments=:#
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 setlocal commentstring=#\ %s
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 setlocal formatoptions-=t formatoptions+=croql
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 let b:undo_ftplugin = "setl fo< com< cms<"
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 if exists("loaded_matchit")
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 " let b:match_ignorecase = 0
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 let b:match_words = '^\s*$\s*if\(def\|ndef\)\=\>:^\s*$\s*elif\>:^\s*$\s*else\>:^\s*$\s*endif\>,' .
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 \ '\<procedure\>:\<\%(initial\|return\|suspend\|fail\)\>:\<end\>'
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 let b:undo_ftplugin ..= " | unlet! b:match_words"
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 endif
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 let b:browsefilter = "Icon Source Files (*.icn)\t*.icn\n" .
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 \ "All Files (*.*)\t*.*\n"
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 let b:undo_ftplugin ..= " | unlet! b:browsefilter"
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 endif
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 let &cpo = s:cpo_save
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 unlet s:cpo_save
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 " vim: nowrap sw=2 sts=2 ts=8