create-nuxt-app icon indicating copy to clipboard operation
create-nuxt-app copied to clipboard

.sublime-project configuration file

Open philipgunther opened this issue 5 years ago • 2 comments

What problem does this feature solve?

In addition to the VSCode configuration, we could add a .sublime-project file to also give Sublime Text instructions.

Sublime Text projects: https://www.sublimetext.com/docs/3/projects.html Indentation settings: https://www.sublimetext.com/docs/3/indentation.html Other uses: https://github.com/schrockwell/nuxt-template/blob/master/nuxt-template.sublime-project

Unfortunately, this only seems to work if you open your project in Sublime Text via "Project > Open Project..." (not if you drag and drop your project folder on the Sublime Text app).

What does the proposed changes look like?

New file nuxt.sublime-project at the root (custom name for each nuxt.js installation? It doesn't seem the work if the file starts with just the dot. Ideally, the name would match the folder name).

{
  "folders":
  [
    {
      "path": "."
    }
  ],
  "settings":
  {
    // The number of spaces a tab is considered equal to
    "tab_size": 2,

    // Set to true to insert spaces when tab is pressed
    "translate_tabs_to_spaces": true,

    // If translate_tabs_to_spaces is true, use_tab_stops will make tab and
    // backspace insert/delete up to the next tabstop
    "use_tab_stops": true,

    // Set to true to removing trailing white space on save
    "trim_trailing_white_space_on_save": true,

    // Set to true to ensure the last line of the file ends in a newline
    // character when saving
    "ensure_newline_at_eof_on_save": true,

    // Encoding used when saving new files, and files opened with an undefined
    // encoding (e.g., plain ascii files). If a file is opened with a specific
    // encoding (either detected or given explicitly), this setting will be
    // ignored, and the file will be saved with the encoding it was opened
    // with.
    "default_encoding": "UTF-8",

    // Determines what character(s) are used to terminate each line in new files.
    // Valid values are 'system' (whatever the OS uses), 'windows' (CRLF) and
    // 'unix' (LF only).
    "default_line_ending": "unix"
  }
}

Add the following lines to .gitignore

# Sublime Text
*.sublime-workspace
This feature request is available on Nuxt community (#c10534)

philipgunther avatar Apr 17 '20 12:04 philipgunther

Are you referring to create-nuxt-app maybe? By default Nuxt doesnt add any jsconfig to your repo, only when you create one through CNA

pimlie avatar May 15 '20 00:05 pimlie

I was thinking of an equivalent for the .editorconfig file for Sublime Text.

philipgunther avatar May 15 '20 23:05 philipgunther