Fixed snapshot
This commit is contained in:
parent
00a5a359c6
commit
855b52e578
1 changed files with 3 additions and 1 deletions
4
vimrc
4
vimrc
|
@ -314,15 +314,18 @@ command! Unsaved call <sid>unsaved()
|
||||||
function! s:snapshot()
|
function! s:snapshot()
|
||||||
let l:filetype = &filetype
|
let l:filetype = &filetype
|
||||||
let l:clipboard = @"
|
let l:clipboard = @"
|
||||||
|
let l:pos = getpos(".")
|
||||||
|
|
||||||
silent 0,$yank "
|
silent 0,$yank "
|
||||||
below new
|
below new
|
||||||
set modifiable
|
set modifiable
|
||||||
silent put "
|
silent put "
|
||||||
|
1,1del
|
||||||
let &filetype = l:filetype
|
let &filetype = l:filetype
|
||||||
set nomodifiable
|
set nomodifiable
|
||||||
set buftype=nofile
|
set buftype=nofile
|
||||||
set bufhidden=hide
|
set bufhidden=hide
|
||||||
|
call setpos(".", l:pos)
|
||||||
silent exec "file ¬".expand("#:t")."@".strftime("%H:%M")
|
silent exec "file ¬".expand("#:t")."@".strftime("%H:%M")
|
||||||
|
|
||||||
exec "normal \<C-w>k"
|
exec "normal \<C-w>k"
|
||||||
|
@ -679,4 +682,3 @@ function! s:init_html_file()
|
||||||
inoremap <buffer> <C-space> <C-o>""ciw<<C-o>""p><C-o>m'</<C-o>""p><C-o>`'<C-o>l
|
inoremap <buffer> <C-space> <C-o>""ciw<<C-o>""p><C-o>m'</<C-o>""p><C-o>`'<C-o>l
|
||||||
inoremap <buffer> <C-CR> <C-o>""diw<C-o>"_cc<<C-o>""p><C-o>o</<C-o>""p><C-o>O
|
inoremap <buffer> <C-CR> <C-o>""diw<C-o>"_cc<<C-o>""p><C-o>o</<C-o>""p><C-o>O
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue