From 187e46aea30e242ef214cbfb20afc0ad49d38171 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Thu, 2 Aug 2018 22:22:01 +0200 Subject: [PATCH] Do not use a named readonly buffer anymore Using a readonly buffer causes more problems than it solves. --- README.md | 6 ------ autoload/startify.vim | 7 +++---- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c4c9ec1..6ca7393 100644 --- a/README.md +++ b/README.md @@ -46,12 +46,6 @@ That's it. A fancy start screen for Vim. _(Almost all visible features enabled. Colorscheme: [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 If you like my plugins, please star them on Github. It's a great way of getting diff --git a/autoload/startify.vim b/autoload/startify.vim index 0309e29..38ffbce 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -151,8 +151,7 @@ function! startify#insane_in_the_membrane() abort autocmd startify CursorMoved call s:set_cursor() silent! %foldopen! - silent! file Startify - set filetype=startify readonly + set filetype=startify if exists('##DirChanged') autocmd startify DirChanged Startify @@ -849,7 +848,7 @@ function! s:set_mark(type, ...) abort \ 'T': 'tabnew', \ } - setlocal noreadonly modifiable + setlocal modifiable if entry.marked && index[0] == a:type 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(). call cursor(line('.'), s:fixed_column) - setlocal readonly nomodifiable nomodified + setlocal nomodifiable nomodified endfunction " Function: s:sort_by_tick {{{1