23 Commits

Author SHA1 Message Date
Nusendra Hanggarawan
99ef803ebd fix: add dynamic TerminalOpen for both vim and nvim 2023-02-20 01:19:07 +07:00
Pablo Scolpino
7816dc6b33 Fix event name
TermOpen => TerminalOpen
2023-02-13 11:49:34 +01: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
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
Eric Ng
7c53389415 add autocmd for filetype changes 2020-11-10 12:24:04 +08:00
Egor Kovetskiy
c69b20f55d keepjumps to save changelist and jumplist 2020-06-29 16:12:28 +03: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
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
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
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
Takashi Kokubun
47af4b7137 Create variable to ignore specific filetypes for highlight 2014-08-09 09:19:19 +09: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
89a457addf Move FixWhitespace into a function. Closes #1
Help from http://github.com/Superflo/vim-files/blob/master/.vimrc#L277
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