Do not use a named readonly buffer anymore
Using a readonly buffer causes more problems than it solves.
This commit is contained in:
parent
8cde338d1f
commit
187e46aea3
|
@ -46,12 +46,6 @@ That's it. A fancy start screen for Vim.
|
||||||
_(Almost all visible features enabled. Colorscheme:
|
_(Almost all visible features enabled. Colorscheme:
|
||||||
[vim-janah](https://github.com/mhinz/vim-janah).)_
|
[vim-janah](https://github.com/mhinz/vim-janah).)_
|
||||||
|
|
||||||
## Gotchas
|
|
||||||
|
|
||||||
The Vim 7.4.898 from macOS 10.12 (`/usr/bin/vim`) comes with a bug, that opens
|
|
||||||
files with `readonly` set. Don't use this Vim from 3 years ago. Use homebrew or
|
|
||||||
MacPorts to get a current version.
|
|
||||||
|
|
||||||
## Author and Feedback
|
## Author and Feedback
|
||||||
|
|
||||||
If you like my plugins, please star them on Github. It's a great way of getting
|
If you like my plugins, please star them on Github. It's a great way of getting
|
||||||
|
|
|
@ -151,8 +151,7 @@ function! startify#insane_in_the_membrane() abort
|
||||||
autocmd startify CursorMoved <buffer> call s:set_cursor()
|
autocmd startify CursorMoved <buffer> call s:set_cursor()
|
||||||
|
|
||||||
silent! %foldopen!
|
silent! %foldopen!
|
||||||
silent! file Startify
|
set filetype=startify
|
||||||
set filetype=startify readonly
|
|
||||||
|
|
||||||
if exists('##DirChanged')
|
if exists('##DirChanged')
|
||||||
autocmd startify DirChanged <buffer> Startify
|
autocmd startify DirChanged <buffer> Startify
|
||||||
|
@ -849,7 +848,7 @@ function! s:set_mark(type, ...) abort
|
||||||
\ 'T': 'tabnew',
|
\ 'T': 'tabnew',
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
setlocal noreadonly modifiable
|
setlocal modifiable
|
||||||
|
|
||||||
if entry.marked && index[0] == a:type
|
if entry.marked && index[0] == a:type
|
||||||
let entry.cmd = 'edit'
|
let entry.cmd = 'edit'
|
||||||
|
@ -866,7 +865,7 @@ function! s:set_mark(type, ...) abort
|
||||||
" Reset cursor to fixed column, which is important for s:set_cursor().
|
" Reset cursor to fixed column, which is important for s:set_cursor().
|
||||||
call cursor(line('.'), s:fixed_column)
|
call cursor(line('.'), s:fixed_column)
|
||||||
|
|
||||||
setlocal readonly nomodifiable nomodified
|
setlocal nomodifiable nomodified
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Function: s:sort_by_tick {{{1
|
" Function: s:sort_by_tick {{{1
|
||||||
|
|
Loading…
Reference in a new issue