annotate runtime/macros/less.vim @ 8015:b421c7f2f172 v7.4.1302

commit https://github.com/vim/vim/commit/6119e6156e024d9047bbfeb7cdfdae259f9e1b92 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 11 12:48:36 2016 +0100 patch 7.4.1302 Problem: Typo in struct field name. (Ken Takata) Solution: Rename jf_pi to jv_pi.
author Christian Brabandt <cb@256bit.org>
date Thu, 11 Feb 2016 13:00:04 +0100
parents 8896150aba23
children 4aae8146c21f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim script to work like "less"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Maintainer: Bram Moolenaar <Bram@vim.org>
7245
8896150aba23 commit https://github.com/vim/vim/commit/e392eb41f8dfc01bd13634e534ac6b4d505326f4
Christian Brabandt <cb@256bit.org>
parents: 5908
diff changeset
3 " Last Change: 2015 Nov 15
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Avoid loading this file twice, allow the user to define his own script.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 if exists("loaded_less")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 let loaded_less = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " If not reading from stdin, skip files that can't be read.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " Exit if there is no file at all.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 if argc() > 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 let s:i = 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 while 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 if filereadable(argv(s:i))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 if s:i != 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 sleep 3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 break
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 if isdirectory(argv(s:i))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 echomsg "Skipping directory " . argv(s:i)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 elseif getftime(argv(s:i)) < 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 echomsg "Skipping non-existing file " . argv(s:i)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 echomsg "Skipping unreadable file " . argv(s:i)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 echo "\n"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 let s:i = s:i + 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 if s:i == argc()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 quit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 next
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 endwhile
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 set nocp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syntax on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 set so=0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 set hlsearch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 set incsearch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 nohlsearch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " Don't remember file names and positions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 set viminfo=
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 set nows
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " Inhibit screen updates while searching
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 let s:lz = &lz
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 set lz
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
7245
8896150aba23 commit https://github.com/vim/vim/commit/e392eb41f8dfc01bd13634e534ac6b4d505326f4
Christian Brabandt <cb@256bit.org>
parents: 5908
diff changeset
51 " Allow the user to define a function, which can set options specifically for
8896150aba23 commit https://github.com/vim/vim/commit/e392eb41f8dfc01bd13634e534ac6b4d505326f4
Christian Brabandt <cb@256bit.org>
parents: 5908
diff changeset
52 " this script.
8896150aba23 commit https://github.com/vim/vim/commit/e392eb41f8dfc01bd13634e534ac6b4d505326f4
Christian Brabandt <cb@256bit.org>
parents: 5908
diff changeset
53 if exists('*LessInitFunc')
8896150aba23 commit https://github.com/vim/vim/commit/e392eb41f8dfc01bd13634e534ac6b4d505326f4
Christian Brabandt <cb@256bit.org>
parents: 5908
diff changeset
54 call LessInitFunc()
8896150aba23 commit https://github.com/vim/vim/commit/e392eb41f8dfc01bd13634e534ac6b4d505326f4
Christian Brabandt <cb@256bit.org>
parents: 5908
diff changeset
55 endif
8896150aba23 commit https://github.com/vim/vim/commit/e392eb41f8dfc01bd13634e534ac6b4d505326f4
Christian Brabandt <cb@256bit.org>
parents: 5908
diff changeset
56
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " Used after each command: put cursor at end and display position
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 if &wrap
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 noremap <SID>L L0:redraw<CR>:file<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 au VimEnter * normal! L0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 noremap <SID>L Lg0:redraw<CR>:file<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 au VimEnter * normal! Lg0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 " When reading from stdin don't consider the file modified.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 au VimEnter * set nomod
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 " Can't modify the text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 set noma
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 " Give help
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 noremap h :call <SID>Help()<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 map H h
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 fun! s:Help()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 echo "<Space> One page forward b One page backward"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 echo "d Half a page forward u Half a page backward"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 echo "<Enter> One line forward k One line backward"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 echo "G End of file g Start of file"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 echo "N% percentage in file"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 echo "\n"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 echo "/pattern Search for pattern ?pattern Search backward for pattern"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 echo "n next pattern match N Previous pattern match"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 echo "\n"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 echo ":n<Enter> Next file :p<Enter> Previous file"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 echo "\n"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 echo "q Quit v Edit file"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 let i = input("Hit Enter to continue")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 " Scroll one page forward
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 noremap <script> <Space> :call <SID>NextPage()<CR><SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 map <C-V> <Space>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 map f <Space>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 map <C-F> <Space>
5908
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
96 map <PageDown> <Space>
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
97 map <kPageDown> <Space>
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
98 map <S-Down> <Space>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 map z <Space>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 map <Esc><Space> <Space>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 fun! s:NextPage()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 if line(".") == line("$")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 if argidx() + 1 >= argc()
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1125
diff changeset
104 " Don't quit at the end of the last file
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1125
diff changeset
105 return
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 next
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 exe "normal! \<C-F>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 " Re-read file and page forward "tail -f"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 map F :e<CR>G<SID>L:sleep 1<CR>F
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 " Scroll half a page forward
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 noremap <script> d <C-D><SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 map <C-D> d
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 " Scroll one line forward
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 noremap <script> <CR> <C-E><SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 map <C-N> <CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 map e <CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 map <C-E> <CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 map j <CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 map <C-J> <CR>
5908
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
128 map <Down> <CR>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 " Scroll one page backward
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 noremap <script> b <C-B><SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 map <C-B> b
5908
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
133 map <PageUp> b
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
134 map <kPageUp> b
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
135 map <S-Up> b
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 map w b
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 map <Esc>v b
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 " Scroll half a page backward
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 noremap <script> u <C-U><SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 noremap <script> <C-U> <C-U><SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 " Scroll one line backward
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 noremap <script> k <C-Y><SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 map y k
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 map <C-Y> k
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 map <C-P> k
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 map <C-K> k
5908
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
149 map <Up> k
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 " Redraw
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 noremap <script> r <C-L><SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 noremap <script> <C-R> <C-L><SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 noremap <script> R <C-L><SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 " Start of file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 noremap <script> g gg<SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 map < g
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 map <Esc>< g
5908
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
160 map <Home> g
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
161 map <kHome> g
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 " End of file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 noremap <script> G G<SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 map > G
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 map <Esc>> G
5908
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
167 map <End> G
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
168 map <kEnd> G
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 " Go to percentage
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 noremap <script> % %<SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 map p %
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 " Search
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 noremap <script> / H$:call <SID>Forward()<CR>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 if &wrap
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 noremap <script> ? H0:call <SID>Backward()<CR>?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 noremap <script> ? Hg0:call <SID>Backward()<CR>?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 fun! s:Forward()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 " Searching forward
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 noremap <script> n H$nzt<SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 if &wrap
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 noremap <script> N H0Nzt<SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 noremap <script> N Hg0Nzt<SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 endif
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 874
diff changeset
190 cnoremap <silent> <script> <CR> <CR>:cunmap <lt>CR><CR>zt<SID>L
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 fun! s:Backward()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 " Searching backward
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 if &wrap
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 noremap <script> n H0nzt<SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 noremap <script> n Hg0nzt<SID>L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 noremap <script> N H$Nzt<SID>L
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 874
diff changeset
201 cnoremap <silent> <script> <CR> <CR>:cunmap <lt>CR><CR>zt<SID>L
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 call s:Forward()
5908
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
205 cunmap <CR>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 " Quitting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 noremap q :q<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 " Switch to editing (switch off less mode)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 map v :silent call <SID>End()<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 fun! s:End()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 set ma
874
4bac29d27e2f updated for version 7.0
vimboss
parents: 7
diff changeset
214 if exists('s:lz')
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 let &lz = s:lz
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 unmap h
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 unmap H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 unmap <Space>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 unmap <C-V>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 unmap f
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 unmap <C-F>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 unmap z
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 unmap <Esc><Space>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 unmap F
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 unmap d
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 unmap <C-D>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 unmap <CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 unmap <C-N>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 unmap e
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 unmap <C-E>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 unmap j
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 unmap <C-J>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 unmap b
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 unmap <C-B>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 unmap w
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 unmap <Esc>v
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 unmap u
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 unmap <C-U>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 unmap k
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 unmap y
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 unmap <C-Y>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 unmap <C-P>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 unmap <C-K>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 unmap r
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 unmap <C-R>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 unmap R
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 unmap g
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 unmap <
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 unmap <Esc><
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 unmap G
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 unmap >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 unmap <Esc>>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 unmap %
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 unmap p
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 unmap n
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257 unmap N
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 unmap q
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 unmap v
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 unmap /
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261 unmap ?
5908
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
262 unmap <Up>
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
263 unmap <Down>
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
264 unmap <PageDown>
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
265 unmap <kPageDown>
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
266 unmap <PageUp>
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
267 unmap <kPageUp>
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
268 unmap <S-Down>
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
269 unmap <S-Up>
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
270 unmap <Home>
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
271 unmap <kHome>
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
272 unmap <End>
32de51778c27 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
273 unmap <kEnd>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274 endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276 " vim: sw=2