git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/1] editorconfig: indent text files with tabs

From
Hans Jerry Illikainen <hji@dyntopia.com>
Date
Jan 5, 2020, 14:00 UTC
Message-ID
<20200105140055.19679-2-hji@dyntopia.com>
In-Reply-To
<20200105140055.19679-1-hji@dyntopia.com>

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
Previous: Hans Jerry Illikainen
Message 2 of 2 in “Add *.txt to .editorconfig”
  1. 0/1 Add *.txt to .editorconfigHans Jerry Illikainen, Jan 5, 2020
  2. 1/1 editorconfig: indent text files with tabsHans Jerry Illikainen, Jan 5, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.