Fortran
Fortran syntax highlighting for Sublime Text 3
Details
Installs
- Total 39K
- Win 18K
- Mac 10K
- Linux 12K
Jun 8 | Jun 7 | Jun 6 | Jun 5 | Jun 4 | Jun 3 | Jun 2 | Jun 1 | May 31 | May 30 | May 29 | May 28 | May 27 | May 26 | May 25 | May 24 | May 23 | May 22 | May 21 | May 20 | May 19 | May 18 | May 17 | May 16 | May 15 | May 14 | May 13 | May 12 | May 11 | May 10 | May 9 | May 8 | May 7 | May 6 | May 5 | May 4 | May 3 | May 2 | May 1 | Apr 30 | Apr 29 | Apr 28 | Apr 27 | Apr 26 | Apr 25 | Apr 24 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 2 | 1 | 3 | 3 | 5 | 2 | 5 | 4 | 5 | 6 | 1 | 1 | 2 | 1 | 8 | 7 | 3 | 5 | 1 | 4 | 3 | 6 | 7 | 3 | 4 | 3 | 5 | 5 | 1 | 5 | 1 | 1 | 2 | 2 | 4 | 1 | 4 | 1 | 0 | 0 | 4 | 6 | 5 | 1 | 0 |
Mac | 0 | 0 | 2 | 7 | 0 | 2 | 1 | 2 | 1 | 2 | 2 | 2 | 1 | 1 | 0 | 1 | 4 | 1 | 2 | 4 | 2 | 3 | 3 | 1 | 3 | 2 | 2 | 4 | 0 | 1 | 4 | 2 | 0 | 2 | 0 | 2 | 2 | 5 | 3 | 1 | 0 | 2 | 2 | 3 | 3 | 1 |
Linux | 0 | 3 | 0 | 4 | 2 | 1 | 4 | 3 | 2 | 4 | 1 | 0 | 1 | 1 | 0 | 4 | 0 | 4 | 4 | 1 | 2 | 5 | 2 | 3 | 4 | 2 | 2 | 5 | 2 | 3 | 3 | 1 | 1 | 2 | 4 | 5 | 3 | 6 | 2 | 0 | 1 | 7 | 5 | 5 | 2 | 4 |
Readme
- Source
- raw.githubusercontent.com
SublimeFortran
Comprehensive syntax highlighting for Fortran in Sublime Text 3.
Features:
Linter based on
gfortran
(requires the package SublimeLinter to work), highlights errors while you work:Hover over inline latex in comments to see it rendered in a popup (requires build >= 3116):
Hover over intrinsic functions to see documentation in a popup (requires build >= 3116):
Code snippets
Indentation rules
Separate syntax definitions for fixed-format and modern Fortran.
Based on the new sublime-syntax file format and therefore currently requires a recent beta version of Sublime Text 3 (minimum build number 3084).
Pull requests are welcome :)
Installation
Option 1: via Package Control (recommended)
1) Install Package Control
2) Open the command pallete via ctrl+shift+p
(Win, Linux) or cmd+shift+p
(OS X)
3) Choose Package Control: Install Package
4) Choose Fortran
5) The package will be installed and updated regularly by Package Control
Option 2: clone the repository
1) In a terminal, cd
into your Sublime Text Packages directory (which you can find via the menu option Preferences → Browse Packages...
)
2) Clone the repository: git clone https://github.com/315234/SublimeFortran.git Fortran
(note the local directory name at the end of the command line)
3) To update the package in future, return to the directory and run git pull
Configuration
Disabling documentation and latex popups
These can be turned on or off with the following settings:
{
"fortran_disable_docs": true,
"fortran_disable_latex": true,
}
Disabling rulers
The Fixed Form Fortran syntax included in this package sets some rulers to help code indentation and show where the 72 character limit is. If you find these distracting, they can be disabled by creating a language specific settings file.
To do this, create a file called FortranFixedForm.sublime-settings
in your Packages/User/
containing the following:
{
"rulers": []
}
Using the linter
This package includes a linter based on SublimeLinter3. SublimeLinter user settings can be modified by selecting SublimeLinter Settings - User
from the Command Palette.
You may need to tell SublimeLinter where gfortran
is located by adding it to paths
in SublimeLinter user settings:
{
"user": {
"paths": {
"linux": [],
"osx": [
"/usr/local/bin"
],
"windows": []
},
}
}
Additional command line flags for gfortran
may be also specified:
“JSON
{
"user”: {
“linters”: {
“gfortranfixedform”: {
“@disable”: false,
“args”: [
“-fdefault-real-8”,
“-fdefault-double-8”
],
“excludes”: []
},
“gfortranmodern”: {
“@disable”: false,
“args”: [
“-fdefault-real-8”,
“-fdefault-double-8”,
“-ffree-line-length-none”
],
“excludes”: []
},
},
}
}
The default flags included are currently `-cpp -fsyntax-only -Wall`.