-
-
Notifications
You must be signed in to change notification settings - Fork 23
Editor Settings
Taufik Nurrohman edited this page Jan 1, 2022
·
7 revisions
TL;DR
- 4
<Space>
instead of 1<Tab>
. - No
<CR>
, only<LF>
. - No
<EOL>
. - UTF-8.
The recommended line width is 120. But this is just to tidy up the comment paragraph. If your code line turns out to be more than that long then that’s okay.
" Use UTF-8
set encoding=utf-8
" Use `<LF>`
set fileformat=unix
" Use 4 `<Space>`
set shiftwidth=4
set softtabstop=4
set tabstop=4
" Remove `<EOL>`
set binary
set noeol
set nofixeol
" Remove `<CR>` and `<EOL>` on write
autocmd BufWritePre * setlocal fileformat=unix noeol
{
"editor.detectIndentation": false,
"editor.insertSpaces": true,
"editor.tabSize": 4,
"files.encoding": "utf8",
"files.eol": "\n",
"files.trimFinalNewlines": true
}