From 623088f6db7686286ef9784c594f7fc1c0bc997f Mon Sep 17 00:00:00 2001 From: Reed Esau Date: Tue, 7 Oct 2014 01:47:07 -0600 Subject: [PATCH] Switch to single-char indicators There were problems with double-width indicator characters not displaying correctly when editing. --- README.markdown | 8 ++++---- plugin/pencil.vim | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.markdown b/README.markdown index 988bc8d..f32746f 100644 --- a/README.markdown +++ b/README.markdown @@ -27,8 +27,8 @@ smooth the path to writing prose. preserves your global settings) * Support for Vim’s Conceal feature to hide markup defined by Syntax plugins (e.g., `_` and `*` markup for styled text in \_*Markdown*\_) -* Support for display of mode indicator (`✐ hard` or `✎ soft`, e.g.) in - the status line +* Support for display of mode indicator (`␍` and `⤸`, e.g.) in the status + line * Pure Vimscript with no dependencies Need spell-check and other features? Vim is about customization. To @@ -291,7 +291,7 @@ terminal to support **bold** and _italic_ styles. ## Status line indicator Your status line can reflect the wrap mode for _pencil_ buffers. For -example, `✐ hard` to represent `HardPencil` (hard line break) mode. To +example, `␍` to represent `HardPencil` (hard line break) mode. To configure your status line, add to your `.vimrc`: ```vim @@ -307,7 +307,7 @@ let g:airline_section_x = '%{PencilMode()}' If you don’t like the default indicators, you can specify different ones: ```vim -let g:pencil#mode_indicators = {'hard': '✐ hard', 'soft': '✎ soft', 'off': '✎ off',} +let g:pencil#mode_indicators = {'hard': '␍', 'soft': '⤸', 'off': '',} ``` Note that `PencilMode()` will return blank for buffers in which _pencil_ diff --git a/plugin/pencil.vim b/plugin/pencil.vim index fc1ec95..9927bca 100644 --- a/plugin/pencil.vim +++ b/plugin/pencil.vim @@ -136,9 +136,10 @@ en if !exists('g:pencil#mode_indicators') " used to set PencilMode() for statusline if s:unicode_enabled() - let g:pencil#mode_indicators = {'hard': '✐ hard', 'soft': '✎ soft', 'off': '✎ off',} + let g:pencil#mode_indicators = {'hard': '␍', 'soft': '⤸', 'off': '',} + "let g:pencil#mode_indicators = {'hard': '✐ hard', 'soft': '✎ soft', 'off': '✎ off',} el - let g:pencil#mode_indicators = {'hard': 'hard', 'soft': 'soft', 'off': 'off',} + let g:pencil#mode_indicators = {'hard': 'hard', 'soft': 'soft', 'off': '',} en en