Commit Graph

40 Commits

Author SHA1 Message Date
Scott Bronson
5540b3faa2 Merge pull request #30 from nusendra/fix/TerminalOpen-event-not-found-in-nvim
fix: add dynamic TerminalOpen for both vim and nvim
2023-02-28 11:25:19 -08:00
Nusendra Hanggarawan
99ef803ebd fix: add dynamic TerminalOpen for both vim and nvim 2023-02-20 01:19:07 +07:00
Scott Bronson
41f2489000 Merge pull request #27 from PabloScolpino/master
Fix event name
2023-02-13 09:46:47 -08:00
Pablo Scolpino
7816dc6b33 Fix event name
TermOpen => TerminalOpen
2023-02-13 11:49:34 +01:00
Scott Bronson
9b472b1f6e Merge pull request #25 from superjamie/no-terminal
Don't highlight in terminal buffers
2023-02-12 20:09:04 -08:00
Jamie Bainbridge
08bdb05c3d Don't highlight in terminal buffers
When opening a buffer with `:terminal` trailing whitespace is
highlighted in there too.

However, this doesn't make much sense. Many programs emit trailing
whitespace and highlighting it distracts from their output. Even the
user's cursor is considered whitespace so there's always a useless
highlight.

If the user is interested in trailing outspace in the output of programs
for later document formatting, they can apply such text formatting in
the document's buffer, where this plugin will be active.

Detect terminal buffers and consider them not valid for this plugin.

Signed-off-by: Jamie Bainbridge <jamie.bainbridge@gmail.com>
2023-02-13 12:17:06 +11:00
Scott Bronson
907174052a Merge pull request #24 from kaihowl/reset-on-ft
fix: when filetype is changed, reconsider excluded filetypes
2022-10-07 10:17:32 -07:00
Kai Hoewelmeyer
b822bad54c fix: when filetype is changed, reconsider excluded filetypes
Some plugins, e.g., fzf-lua, only set the filetype after creating a new
buffer. To exclude the later-set filetype correctly, rerun the setup.
2022-10-07 10:17:09 +02:00
Scott Bronson
05f068ebd9 Revert "add autocmd for filetype changes"
This reverts commit 7c53389415,
pull request #21.

It is causing non-erroneous trailing whitespace to be highlighted.

Fixes #22.
2020-11-18 11:38:32 -08:00
Scott Bronson
b5289251ae Merge pull request #21 from ZwodahS/master
trigger on filetype changes too
2020-11-13 07:44:54 -08:00
Eric Ng
7c53389415 add autocmd for filetype changes 2020-11-10 12:24:04 +08:00
Scott Bronson
610ca1a97c Merge pull request #20 from kovetskiy/master
keepjumps to save changelist and jumplist
2020-06-29 10:47:53 -07:00
Egor Kovetskiy
c69b20f55d keepjumps to save changelist and jumplist 2020-06-29 16:12:28 +03:00
Scott Bronson
6b7cdecff2 clean up license language 2019-12-09 08:41:03 -08:00
Scott Bronson
901255e9af explicitly declare the license, fixes #19 2019-12-09 08:34:06 -08:00
Scott Bronson
4c59654821 Merge pull request #18 from liuqiang1357/master
Fix inconsistent highlight color
2017-09-22 17:09:16 -07:00
liuqiang1357
16e4d4dd27 Fix inconsistent highlight color 2017-08-13 12:49:49 +08:00
Scott Bronson
733fb64337 Revert "Make ShouldMatchWhitespace() script-local function"
This reverts commit 1b7f4dcfdc.

Sounds like at least one other plugin is using ShouldMatchWhitespace.

Conflicts:
	plugin/trailing-whitespace.vim
2016-03-27 21:33:34 -07:00
Scott Bronson
8328b966ab Merge remote-tracking branch 'hugomg/master'
Conflicts:
	plugin/trailing-whitespace.vim
2016-03-13 01:38:23 -08:00
Scott Bronson
d94d55177c Merge pull request #14 from tyru/customizable-and-u3000-support
Make highlight customizable and U+3000 character support
2016-03-13 01:28:37 -08:00
tyru
5753ff3f30 Support 'IDEOGRAPHIC SPACE' character (U+3000)
http://www.fileformat.info/info/unicode/char/3000/index.htm
2016-03-13 04:05:07 +09:00
tyru
8230c95010 Add 'default' to :highlight command
Same as the command without 'autocmd ColorScheme *',
add 'default' to :highlight command.
2016-03-13 04:00:06 +09:00
tyru
1b7f4dcfdc Make ShouldMatchWhitespace() script-local function 2016-03-13 03:58:20 +09:00
Scott Bronson
4beb3bd490 Merge pull request #15 from jh-yu/master
fix whitespace highlight bug
2016-03-03 18:51:53 -08:00
Jiahui Yu
7d55472713 fix whitespace highlight bug 2016-02-28 14:58:13 +08:00
Hugo Gualandi
8c9518306d Do not remove whitespace that is preceeded by if backslash
Trailing whitespace can be useful in .vimrc files if we want to set a
string property that ends in whitespace. For example:

    set showbreak=↪\ \ \

This change adds a "\\\@<!" at the start of every regex in the plugin
2015-12-05 16:39:32 -02:00
Scott Bronson
478b217d29 Merge pull request #10 from lucerion/master
Change whitespace highlighting event to BufRead
2015-07-24 15:01:15 -07:00
Scott Bronson
c89fc0db1d Merge pull request #9 from marlun/patch-1
Make it a lot easier to override highlighting
2015-07-24 14:59:54 -07:00
lucerion
c35e6ec061 Change whitespace highlighting to BufRead event 2015-05-21 00:06:54 +03:00
Martin Lundberg
01d9f26995 Make it a lot easier to override highlighting
Adding default to the highlight line make sure that the highlighting won't be overwritten if it's already set in a user colorscheme.
2015-04-12 01:10:47 +02:00
Scott Bronson
d4ad27de05 Merge pull request #8 from k0kubun/extra_whitespace_ignored_filetypes
Create variable to ignore specific filetypes for highlight
2014-08-09 09:20:55 -07:00
Takashi Kokubun
47af4b7137 Create variable to ignore specific filetypes for highlight 2014-08-09 09:19:19 +09:00
Scott Bronson
0c79bd5f94 Excellent, an alternative exists 2014-06-19 10:22:54 -07:00
Scott Bronson
4234770084 Merge pull request #3 from duncannz/master
Stop the script from double execution with a "loaded" variable
2013-10-18 09:10:50 -07:00
Duncan de Wet
7be1e55f10 Stop the script from double execution with a "loaded" variable 2013-10-18 21:56:20 +13:00
Scott Bronson
6bfea0006a Ignore doc/tags to be more Pathogen-friendly. Closes #2. 2010-09-25 08:34:30 -07:00
Scott Bronson
301a6dadbd Update readme to point to git repo
Also make readme less linky, graywh's hint has been superseded.
2010-09-15 18:25:09 -07:00
Scott Bronson
89a457addf Move FixWhitespace into a function. Closes #1
Help from http://github.com/Superflo/vim-files/blob/master/.vimrc#L277
1.0
2010-09-15 17:12:15 -07:00
Scott Bronson
c5f1e9298f save and restore the search highlight 2010-09-15 12:45:39 -07:00
Scott Bronson
e10ca02d0d initial checkin 2010-08-11 12:28:48 -07:00