git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] Add *.txt to .editorconfig
@ 2020-01-05 14:00 Hans Jerry Illikainen
  2020-01-05 14:00 ` [PATCH 1/1] editorconfig: indent text files with tabs Hans Jerry Illikainen
  0 siblings, 1 reply; 2+ messages in thread
From: Hans Jerry Illikainen @ 2020-01-05 14:00 UTC (permalink / raw)
  To: git; +Cc: Hans Jerry Illikainen

Minor patch that adds *.txt to .editorconfig to avoid annoyance when
editing git docs with an editor set to indent with space as a default.

Hans Jerry Illikainen (1):
  editorconfig: indent text files with tabs

 .editorconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.20.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] editorconfig: indent text files with tabs
  2020-01-05 14:00 [PATCH 0/1] Add *.txt to .editorconfig Hans Jerry Illikainen
@ 2020-01-05 14:00 ` Hans Jerry Illikainen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Jerry Illikainen @ 2020-01-05 14:00 UTC (permalink / raw)
  To: git; +Cc: Hans Jerry Illikainen

Previously, the .editorconfig did not specify an indentation style for
text files.  However, a quick look for indentation-like spacing suggest
that tabs are more common for documentation:

$ git grep -Pe '^ {4}' -- '*.txt' |wc -l
2683
$ git grep -Pe '^\t' -- '*.txt' |wc -l
14011

Note that there are a lot of files that indent list continuations (and
other things) with a single space -- if the first search was made
without the fixed quantifier the result would look very different.
However, the result does correspond with my anecdotal experience when
editing git documentation.

This commit adds *.txt to .editorconfig as an extension that should be
indented with tabs.

Signed-off-by: Hans Jerry Illikainen <hji@dyntopia.com>
---
 .editorconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.editorconfig b/.editorconfig
index 42cdc4bbfb..f9d819623d 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -4,7 +4,7 @@ insert_final_newline = true
 
 # The settings for C (*.c and *.h) files are mirrored in .clang-format.  Keep
 # them in sync.
-[*.{c,h,sh,perl,pl,pm}]
+[*.{c,h,sh,perl,pl,pm,txt}]
 indent_style = tab
 tab_width = 8
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-05 14:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-05 14:00 [PATCH 0/1] Add *.txt to .editorconfig Hans Jerry Illikainen
2020-01-05 14:00 ` [PATCH 1/1] editorconfig: indent text files with tabs Hans Jerry Illikainen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).