Skip to content

Commit 46907dd

Browse files
committed
adding install message and some refactoring
1 parent 6d8f9e9 commit 46907dd

9 files changed

+47
-14
lines changed

Default (Linux).sublime-keymap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
[{ "key": "selector", "operator": "equal", "operand": "markup.list.unnumbered.todo.markdown" }]
3434
},
3535

36-
{ "keys": ["f1"], "command": "note_change_color", "context":
37-
[{ "key": "selector", "operator": "equal", "operand": "text.html.markdown.note" }]
38-
}
36+
// { "keys": ["f1"], "command": "note_change_color", "context":
37+
// [{ "key": "selector", "operator": "equal", "operand": "text.html.markdown.note" }]
38+
// }
3939
]

Default (OSX).sublime-keymap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
[{ "key": "selector", "operator": "equal", "operand": "markup.list.unnumbered.todo.markdown" }]
3434
},
3535

36-
{ "keys": ["f1"], "command": "note_change_color", "context":
37-
[{ "key": "selector", "operator": "equal", "operand": "text.html.markdown.note" }]
38-
}
36+
// { "keys": ["f1"], "command": "note_change_color", "context":
37+
// [{ "key": "selector", "operator": "equal", "operand": "text.html.markdown.note" }]
38+
// }
3939
]

Default (Windows).sublime-keymap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
[{ "key": "selector", "operator": "equal", "operand": "markup.list.unnumbered.todo.markdown" }]
3232
},
3333

34-
{ "keys": ["f1"], "command": "note_change_color", "context":
35-
[{ "key": "selector", "operator": "equal", "operand": "text.html.markdown.note" }]
36-
}
34+
// { "keys": ["f1"], "command": "note_change_color", "context":
35+
// [{ "key": "selector", "operator": "equal", "operand": "text.html.markdown.note" }]
36+
// }
3737
]

Documentation/docs.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11

2+
# Notes Management
23
## Settings and Customizations
34
#### Notes file extension
45
#### Notes root folder
56
#### Keyboard Shortcuts
67
#### Customizing default color for Note files
78

9+
# Note Writing
10+
11+
812
---
13+
914
#### Deleting notes
1015
#### Renaming notes
1116
#### Archiving notes

Main.sublime-menu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@
7272
{ "caption": "Index", "command": "notes_buffer"},
7373
{ "caption": "-" , "id": "note" },
7474
{ "caption": "Change Color…", "command": "note_change_color"},
75+
{ "caption": "Archive…", "command": "note_archive"},
76+
{ "caption": "Delete…", "command": "note_remove"},
77+
{ "caption": "Rename…", "command": "note_rename"},
7578
{ "caption": "-" , "id": "end" }
7679
]
7780
}

Note.sublime-settings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"color_scheme": "Packages/PlainNotes/Color Schemes/Sticky-GreenLight.tmTheme",
2+
"color_scheme": "Packages/PlainNotes/Color Schemes/Sticky-Yellow.tmTheme",
33
"draw_indent_guides": false,
44
"enable_table_editor": true,
55
"highlight_line": false,

messages/install.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Welcome to:
2+
____ _ _ _ _ _
3+
| _ \| | __ _(_)_ __ | \ | | ___ | |_ ___ ___
4+
| |_) | |/ _` | | '_ \| \| |/ _ \| __/ _ \/ __|
5+
| __/| | (_| | | | | | |\ | (_) | || __/\__ \
6+
|_| |_|\__,_|_|_| |_|_| \_|\___/ \__\___||___/
7+
................................................
8+
github.com/aziz/PlainNotes
9+
10+
✎ How to use PlainNotes [http://git.io/80Hb8w]
11+
✎ Feature requests and bug reports [http://git.io/9mnAWQ]

notes.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ def find_notes(self, root):
2525
note_files = []
2626
for path, subdirs, files in os.walk(self.notes_dir, topdown=False):
2727
relpath = os.path.relpath(path, root)
28-
# print(relpath)
2928
for name in files:
3029
for ext in settings().get("note_file_extensions"):
31-
if (relpath != ".archive" and relpath != ".brain") and fnmatch.fnmatch(name, "*." + ext):
30+
if (not relpath.startswith(".brain")) and fnmatch.fnmatch(name, "*." + ext):
3231
note_files.append((re.sub('\.' + ext + '$', '', name),
3332
os.path.join(path, name),
3433
os.path.getmtime(os.path.join(path, name))
@@ -135,6 +134,21 @@ def is_enabled(self):
135134
return self.window.active_view().settings().get("syntax").endswith("Note.tmLanguage")
136135

137136

137+
class NoteArchiveCommand(sublime_plugin.WindowCommand):
138+
139+
def run(self):
140+
pass
141+
142+
class NoteRemoveCommand(sublime_plugin.WindowCommand):
143+
144+
def run(self):
145+
pass
146+
147+
class NoteRenameCommand(sublime_plugin.WindowCommand):
148+
149+
def run(self):
150+
pass
151+
138152
def save_to_brain():
139153
print("SAVING TO DISK-----------------")
140154
print(db)

notes_buffer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ def list_files(self, path):
3737
level = root.replace(path, '').count(os.sep) - 1
3838
indent = ' ' * TAB_SIZE * (level)
3939
relpath = os.path.relpath(root, path)
40-
if not (relpath == "." or relpath == ".brain" or relpath == ".archive"):
40+
if not (relpath.startswith(".")):
4141
line_str = '{0}▣ {1}'.format(indent, os.path.relpath(root, path))
4242
lines.append( (line_str, root) )
43-
if not (relpath == ".brain" or relpath == ".archive"):
43+
if not (relpath.startswith(".brain")):
4444
subindent = ' ' * TAB_SIZE * (level + 1)
4545
for f in files:
4646
line_str = '{0}≡ {1}'.format(subindent, re.sub('\.note$', '', f))

0 commit comments

Comments
 (0)