.gitignore and .gitattributes for Git
#1

Nothing special, just a good .gitignore and .gitattributes for PAWN developers who uses Git SCM:

Contains OS files(Win/Linux/Mac), IDE files, build automation, source control managers and PAWN files

.gitignore:
https://gist.github.com/Yousha/9015a...1875a5f7ae0c8a

.gitattributes:
https://gist.github.com/Yousha/9ebdc...8b3d218b32cd7a
Reply
#2

Nice, Thanks!
Reply
#3

Nice.
But I like to keep the .vscode folder in the gamemode repository, just for the encoding preference in settings.json

Код:
{
    "files.encoding": "windows1252",
}
Reply
#4

Interesting.
Reply
#5

Thanks for the feedback

Quote:
Originally Posted by SimonItaly
Посмотреть сообщение
Nice.
But I like to keep the .vscode folder in the gamemode repository, just for the encoding preference in settings.json

Код:
{
    "files.encoding": "windows1252",
}
Good point, but:

1- What if someone don't use VSCode to work with your codes? (like Notepad++ or Atom or Sublime)
Then those encode-specific data breaks in their IDE's

2- Currently the standard/default encoding is UTF-8(in anywhere), which supports most of languages with good range of characters...
So why not simply encode your files into the UTF-8 or Unicode and make them more cross-platform? instead of rely on the IDE's settings

3- And finally, windows-* encoding is Windows-specific and not guaranteed to work on any other OS like Linux/OS X... so what if someone use your project in other machine? I'm sure it doesn't works fine

UTF-8 without BoM
Reply
#6

Yeah, I stand corrected. I used to think that an UTF-8 source file wasn't friendly with SA:MP when you started using accented characters (аимтщ) which are a must in Italian language, but I just tried and it works (it's weird that I've never-ever tried that in 7 years of scripting).
I think it's a bad habit I inherit from the time I was using Pawno on Windows and gedit on Linux (ages ago), so that editing a .pwn on my Linux laptop resulted in a messy code on my Windows PC.

(something like this, saving in UTF-8 and opening in Windows-1252)


Anyway VS Code supports a wide range of encodings even on Linux:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)