comparison plugin/lawrencium.vim @ 57:220c9508ff62

Fixes for Lawrencium files: - Move the cursor to the top of the buffer. - Insert stuff at the first line instead of below it.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 14 Nov 2012 22:16:26 -0800
parents 6a61724190ea
children 621185a5fa48
comparison
equal deleted inserted replaced
56:2b3fb72d5471 57:220c9508ff62
236 " buffer. 236 " buffer.
237 function! s:HgRepo.ReadCommandOutput(command, ...) abort 237 function! s:HgRepo.ReadCommandOutput(command, ...) abort
238 let l:all_args = [a:command] + a:000 238 let l:all_args = [a:command] + a:000
239 let l:hg_command = call(self['GetCommand'], l:all_args, self) 239 let l:hg_command = call(self['GetCommand'], l:all_args, self)
240 call s:trace("Running Mercurial command: " . l:hg_command) 240 call s:trace("Running Mercurial command: " . l:hg_command)
241 execute 'read !' . escape(l:hg_command, '%#\') 241 execute '0read !' . escape(l:hg_command, '%#\')
242 endfunction 242 endfunction
243 243
244 " Build a Lawrencium path for the given file and action. 244 " Build a Lawrencium path for the given file and action.
245 " By default, the given path will be made relative to the repository root, 245 " By default, the given path will be made relative to the repository root,
246 " unless '0' is passed as the 4th argument. 246 " unless '0' is passed as the 4th argument.
1196 " Setup the new buffer. 1196 " Setup the new buffer.
1197 setlocal readonly 1197 setlocal readonly
1198 setlocal nomodified 1198 setlocal nomodified
1199 setlocal bufhidden=delete 1199 setlocal bufhidden=delete
1200 setlocal buftype=nofile 1200 setlocal buftype=nofile
1201 goto
1201 1202
1202 " Remember the repo it belongs to and make 1203 " Remember the repo it belongs to and make
1203 " the Lawrencium commands available. 1204 " the Lawrencium commands available.
1204 let b:mercurial_dir = l:repo.root_dir 1205 let b:mercurial_dir = l:repo.root_dir
1205 call s:DefineMainCommands() 1206 call s:DefineMainCommands()