Skip to content

Commit 6b1a9a5

Browse files
author
Guillaume Depardon
committed
Merge pull request #13 from Kerosene2000/master
Many new languages header handle and little file detection improvement
2 parents 9291b74 + b49de4c commit 6b1a9a5

File tree

3 files changed

+32
-7
lines changed

3 files changed

+32
-7
lines changed

42 Headers.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
import os, time, datetime, re
33
from os.path import join, split, getctime, dirname, realpath
44

5-
PLUGIN_NAME = '42 Headers'
5+
# PLUGIN_NAME = '42 Headers'
6+
PLUGIN_NAME = os.path.dirname(os.path.realpath(__file__))
67
global IS_INIT
78
IS_INIT = False
89
PACKAGE_FILE = lambda fileName : join(sublime.packages_path(), PLUGIN_NAME, fileName)
@@ -20,12 +21,14 @@ def LOAD_HEADER(fileName) :
2021
return headerFile.read()
2122

2223
HEADERS = {
23-
'^Makefile$' : 'Makefile.header',
24-
'^.*\.c|h|js|css$' : 'C.header',
25-
'^.*\.php$' : 'Php.header',
26-
'^.*\.html$' : 'Html.header',
27-
'^.*\.lua$' : 'Lua.header',
28-
'^.*\.s|s64|asm|hs|h64$' : 'ASM.header',
24+
'^Makefile$' : 'Makefile.header',
25+
'^.*\.c|h|js|css|cs|scala|rs|go|swift$' : 'C.header',
26+
'^.*\.php$' : 'Php.header',
27+
'^.*\.html$' : 'Html.header',
28+
'^.*\.lua$' : 'Lua.header',
29+
'^.*\.ml|mli$' : 'OCaml.header',
30+
'^.*\.hs$' : 'Haskell.header',
31+
'^.*\.s|s64|asm|hs|h64$' : 'ASM.header',
2932
}
3033

3134
def init() :

headers/Haskell.header

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{- ************************************************************************** -}
2+
{- -}
3+
{- ::: :::::::: -}
4+
{- %-51s:+: :+: :+: -}
5+
{- +:+ +:+ +:+ -}
6+
{- By: %-43s+#+ +:+ +#+ -}
7+
{- +#+#+#+#+#+ +#+ -}
8+
{- Created: %-41s#+# #+# -}
9+
{- Updated: %-40s### ########.fr -}
10+
{- -}
11+
{- ************************************************************************** -}

headers/OCaml.header

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
(* ************************************************************************** *)
2+
(* *)
3+
(* ::: :::::::: *)
4+
(* %-51s:+: :+: :+: *)
5+
(* +:+ +:+ +:+ *)
6+
(* By: %-43s+#+ +:+ +#+ *)
7+
(* +#+#+#+#+#+ +#+ *)
8+
(* Created: %-41s#+# #+# *)
9+
(* Updated: %-40s### ########.fr *)
10+
(* *)
11+
(* ************************************************************************** *)

0 commit comments

Comments
 (0)