Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Suggestion to inform users that default_root behaviour has changed.

Abierto
#120 5 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
tooling

Línea de trabajo

Start in command_base.py and inspect how default_root and the per-command settings new_file_default_root, rename_file_default_root, and copy_file_default_root are read. Confirm the intended fallback when a per-command key is absent, while preserving explicitly configured per-command roots. Done means existing default_root configurations continue to work and individual roots can still be customized.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Hi Scott,

I just figured out that default_root: project_root no longer works, and that as of 1.5.1 you need to set up individual settings for default_root in for each of the new, move, copy commands:

new_file_default_root
rename_file_default_root
copy_file_default_root

https://github.com/skuroda/Sublime-AdvancedNewFile/commit/be84395c78a33bdcb552c4fc413bbfc0af5fbd2e#diff-0994d3f547d1105beb6a24ace4f44472R412

Here in command_base.py, could I suggest that you check for existence of the above keys in settings, and if not, then use the original default_root settings? This would allow the current installations to continue to work as is but allow fine tuning of roots if needed.

My Python has pretty much gone by the wayside as I haven't touched it since my 2 week stint last year, but something like this (excuse the Ruby-like code). I can't remember if self.settings.get returns nil or blank string, but something along these lines.

    def _get_default_root(self):
        root_setting_value = self.get_default_root_setting()
        root_setting = self.settings.get(root_setting_value) || self.settings.get(DEFAULT_ROOT_SETTING)
        if root_setting == DEFAULT_ROOT_SETTING:
            return self.settings.get(DEFAULT_ROOT_SETTING)
        return root_setting

Keep up the great work! I use ANF every single day I code!

Brian

Lenguaje dominante
Python
Estrellas
833
Forks
96
Merge medio
1 min
PR fusionados (30 d)
5

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de SublimeText/AdvancedNewFile

Todos los issues de SublimeText/AdvancedNewFile

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.