[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] [PATCH] Some improvements

From: Liu Hao
Subject: [Nano-devel] [PATCH] Some improvements
Date: Wed, 6 Dec 2017 17:41:15 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

Dear nano developers,

I am maintaining the Windows port [1] of GNU nano. GNU nano is also the
editor I use exclusively on Linux.

Here I would like to share some patches with you. These patches address
a few issues about the editor itself. I do not have the FSF copyright
assignment paper for GNU nano so please evaluate, edit or apply them at
your disposal. Any feedback is welcome.



# 0001-Added-highlighting-of-C-11-keywords-and-special-iden.patch

This patch adds highlighting for a number of keywords and typedefs
introduced by C99 (_Bool, _Complex, _Imaginary, u?int(8,16,32,64)_t,
etc), C11 (_Generic, _Atomic, _Thread_local, _Static_assert, etc), C++11
(constexpr, decltype, etc), as well as two identifiers with special
meaning in C++11 (override and final).

Highlighting of angle brackets blots C++ template parameters, so it is

Highlighting of preprocessor directives are moved after everything but
comments, so an entire directive is always colored, as preprocessor
directives do not follow the other syntactical rules.


# 0002-Added-highlighting-of-trailing-whitespace-in-the-def.patch

This patch enables highlighting of trailing whitespaces in the default


# 0003-Fix-up-c.nanorc-a-little.patch

This patches reverts the old font color for (FIXME|TODO|XXX). It used to
be red, but is omitted as defaulted now. On quite a few terminals it is
grey on yellow thus much harder to read.

Highlighting of labels in C blots C++ (private|protected|public):, so it
is removed.


# 0004-When-untabifying-lines-strip-all-leading-spaces-if-t.patch

When unindenting lines, nano refuses to do anything if at least one line
cannot be unindented. This troublesome when adjusting code that was
misaligned (for example, when it was copy-n-pasted over an SSH terminal
with autoindent turned on). This patch makes nano unindent those lines
unconditionally. If there are fewer spaces than a TAB in the front of a
line, all of them are deleted. So if you press M-{ enough times, all
lines selected will have no leading spaces.


# 0005-Reload-last-search-string-if-any.patch

With the search history option turned on, if a new file is opened and
M-W is pressed, nano tries to reload the last string searched as the
search string. This is not the case when you press ^W or ^\ to open the
interactive search or replace input box, where it will be empty and
pressing Enter will cancel the operation. This patch makes nano reload
the last search string when asked to open the search input box,
following the behavior when M-W is pressed.

Best regards,

Attachment: 0001-Added-highlighting-of-C-11-keywords-and-special-iden.patch
Description: Text document

Attachment: 0002-Added-highlighting-of-trailing-whitespace-in-the-def.patch
Description: Text document

Attachment: 0003-Fix-up-c.nanorc-a-little.patch
Description: Text document

Attachment: 0004-When-untabifying-lines-strip-all-leading-spaces-if-t.patch
Description: Text document

Attachment: 0005-Reload-last-search-string-if-any.patch
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]