Adam Harrison
3541ab4aa1
Removed unecessary check.
2021-06-18 17:33:55 -04:00
Adam Harrison
b5cbe3a2fb
Added in the ability to iterate through cursors backwards.
2021-06-18 17:33:55 -04:00
Adam Harrison
dfc57bd884
Used routine to add cursors in order correctly.
2021-06-18 17:33:55 -04:00
Adam Harrison
6915d86d59
Introduced the constraint that all cursors must be in order.
2021-06-18 17:33:55 -04:00
Adam Harrison
0f229b039d
Fixed merging. Fixed selection undo stack.
2021-06-18 17:33:55 -04:00
Adam Harrison
c494d52caf
Used an inappropriate function in a selection loop.
2021-06-18 17:33:55 -04:00
Adam Harrison
c6f7e473f0
That's what I get for not testing after a 'simple' refactor.
2021-06-18 17:33:55 -04:00
Adam Harrison
858f7a2a50
Added in missing boolean.
2021-06-18 17:33:55 -04:00
Adam Harrison
b42708fe56
Cleaned up functions.
2021-06-18 17:33:55 -04:00
Adam Harrison
6c0d124410
Allows for rectangular selections with ctrl; also fixed tabbing.
2021-06-18 17:33:55 -04:00
Adam Harrison
08ab6cba05
Added in multiple clipboard line buffers.
2021-06-18 17:33:55 -04:00
Adam Harrison
37a3884ee2
Initial commit of multicursor. Next step is to investigate how multicursor works on various other IDEs and ape those.
2021-06-18 17:33:55 -04:00
Adam
bdc37f1f6c
Added in remove file function. ( #272 )
...
* Added in remove file function.
* Changed namespace of rename and remove (now delete).
2021-06-17 22:26:27 +02:00
jgmdev
e070dbebc1
Fix undeclared NagView findindex() by moving it to common.
2021-06-13 21:28:29 -04:00
Francesco
98164f6d4f
Integrate mkdirp function in common module ( #265 )
...
Move the function mkdirp into common to be generally available.
Use the new common.mkdirp from create_user_directory() from
core/init.lua replacing previous parent directory creation code
within the function.
The previous mkdirp function did not work on Windows where
absolute paths starts with a drive letter. The code from
create_user_directory() did not have this problem but was wrong
in the way it was creating the nested directories.
The new implementation in common.mkdirp fix both problems.
2021-06-13 19:50:42 +02:00
Takase
0fd1fa8872
Commands refactor ( #257 )
...
* remove unecessary check
* move command registration to core/commands
2021-06-07 23:00:29 +02:00
Takase
130b29438a
Allow creation of nested directories ( #254 )
...
* allow nested directories to be created
* fix / be turned into //
* refactor error handling
* refactor path splitting and mkdir calls
If a path exists it will now return immediately.
* fix typo
* remove possible trailing empty string
* fix bugs with path check
2021-06-07 22:44:35 +02:00
Adam Harrison
2170ab9649
Apologies for the subpar previous commit. This fixes the bugs in that one.
2021-06-05 00:50:25 -04:00
Adam Harrison
090d67f252
Exposed indent function, and made it more flexible.
2021-06-05 00:44:35 -04:00
Adam
248d70a8ca
Add PCRE to support regular expressions
...
Use regular expressions instead of Lua patterns for find and replace editor commands.
Syntax files can now use regex or Lua patterns as before keeping backward compatibility for plugins.
2021-06-02 21:27:00 +02:00
lqdev
ea5e9b0ce5
fixed broken Doc:save monkeypatch
2021-06-02 19:11:59 +02:00
Adam
4ffb5e3672
Fixed commenting and uncommenting. ( #224 )
2021-05-28 08:17:49 +02:00
Francesco Abbate
34e38dd04a
Fix missing check for filename when saving a file
...
Close #225
2021-05-27 18:53:31 +02:00
Adam Harrison
f1a4bf8218
Changed to multiline select.
2021-05-26 17:52:01 -04:00
Francesco Abbate
10fde6e264
Implement lazy loading of directories
...
When the number of files in a project directory is above the max
limit switch back to a mechanism to read directory content only
when the corresponding folder is expanded in the treeview.
When the command core:find-file is invoked the command core:open-file
is executed instead because the complete list of the project's
files is not available.
When a project search is done we search through all the files within
the project dir without indexing them.
Address issues #217 #203 #183 .
2021-05-26 14:22:10 +02:00
Adam Harrison
8acb3fae8c
Fixed minor error that occurs when saving as after viewing a non-doc tab.
2021-05-24 17:26:16 -04:00
Francesco Abbate
f17f5a4d6d
Fix problem with filenames missing normalization
2021-05-24 15:58:49 +02:00
Adam
a254d393db
Indent Enhancements ( #202 )
...
* Indent enhancements.
* Fixed to match style guidelines.
* Added in useful explanatory comment.
* Changed which selection we're using, as we don't want this kind of wrapping to happen.
* Fixed bug involving lines full of whitespace.
* Removed unecessary commit.
* Actually reverted function, so that we don't screw up commenting.
* Fixed hard tab issue.
2021-05-22 15:01:19 +02:00
Adam
b278306fc9
Changed deindent, so that if the deindent runs into an unusual line with a partial indent at the front, it'll still de-indent that. ( #193 )
2021-05-19 22:41:28 +02:00
Adam
e43f1b9df9
Unified open and saving style. ( #189 )
2021-05-17 09:29:51 +02:00
Adam
4c42dd4adc
Do not close command view on open-file is file is invalid or it is a directory
...
Added in a validation function which fires before submitting a command enter; found it incredibly irritating to try to open something, hit enter, only to be told I'd selected a directory, and then have to go through the whole process again. (#175 )
2021-05-05 08:04:51 +02:00
Francesco Abbate
5766329313
Fix filename problem
...
Close #163
2021-05-01 19:27:29 +02:00
Francesco Abbate
857807b23a
Use ab filename as initial text for open file command
2021-05-01 19:27:29 +02:00
adamharrison
2e7817f609
Use the active view's filename when opening a file
2021-04-25 20:58:56 +02:00
Francesco Abbate
f7375924ab
Make non-borderless mode work
2021-04-12 19:05:30 +02:00
Francesco Abbate
3b040aabc7
Implement unicode character replacements
...
Useful to draw whitespaces with alternate characters and colors
without slowing down the text rendering.
A new API is implemented. A renderer.replacements object can be created
to list the replacements.
In turns the function renderer.draw_text and draw_text_subpixel now accept
two optional arguments for replacements.
2021-04-01 18:05:59 +02:00
Francesco Abbate
04063ff47e
Fix error introduced with commit c0ad86d
2021-03-18 15:46:44 +01:00
Francesco Abbate
94b99b658e
Fix multi-line commands
...
When second position is at the beginning of a line do not include this latter.
2021-02-24 18:06:47 +01:00
Francesco Abbate
59fbf9cfc0
Merge branch 'master' into dev
2021-02-17 23:57:02 +01:00
Francesco Abbate
9b27180267
Use doc on_save hooks to reload user module
2021-02-17 20:10:39 +01:00
Francesco Abbate
1ce1c114ba
Fix reload module problem on windows
2021-02-17 19:20:00 +01:00
Francesco Abbate
6369a7f760
Use tilde expansion when running save-as command
2021-02-16 22:54:00 +01:00
bud
63b024cb81
FIX: Use PATHSEP instead of hardcoded "/" path separator
2021-02-16 19:25:40 +01:00
bud
b9fcb6e5ae
ADD: test in doc:save(), if the file is the user module, automatically reload config
2021-02-15 22:09:25 +01:00
bud
cc9aa23340
REMOVE: dont add reload on save hook in core:open-user-module, its automatically done in doc:save()
2021-02-15 22:09:06 +01:00
Francesco Abbate
08b010a2da
Add command root:close-all
2021-01-13 16:51:42 +01:00
Francesco Abbate
431bf68e72
Fix missing gome expand in remove-directory command
2021-01-03 23:52:02 +01:00
Francesco Abbate
8d4ba0cb34
Fix behavior when selecting project directories
2021-01-03 15:35:35 +01:00
Francesco Abbate
e548a6adb9
Fix directories management to always keep the project's directory
2021-01-03 12:02:07 +01:00
Francesco Abbate
7280ae47ab
Fix missing absolute_path call in change-project-folder command
2020-12-30 14:40:03 +01:00
Francesco Abbate
b91a84eb56
Fix project change and quit versus workspace plugin
2020-12-30 14:31:36 +01:00
Francesco Abbate
f2faddbec7
Add command to create a directory in a new category "files"
...
Use the alt + (left click) is tree view to create a directory and
shift + (middle click) to remove a project directory.
2020-12-30 11:52:26 +01:00
Francesco Abbate
ddd56ec615
Add command to remove a directory from the project
...
In addition directories can be removed with a mouse middle-click in the
tree view pane.
2020-12-28 15:51:16 +01:00
Francesco Abbate
c042bfc907
Change project files output to not include a prefix '/' in filename
...
It make sense to not put the initial '/' in the filename as the name
is relative to the top directory it belongs to.
By removing the the initial '/' in the filename we can re-introduce the
variable
core.project_files
to stay compatible with standard Lite. The project_files variable will
always point to the files table of the first entry of
core.project_directories.
2020-12-28 10:26:27 +01:00
Francesco Abbate
4e260cd03e
Add a comment about a possible improvement
2020-12-27 18:33:34 +01:00
Francesco Abbate
df74781da8
Fix project search and status view for new add directory feature
2020-12-27 18:28:21 +01:00
Francesco Abbate
e4fa196b33
Finalize add project directory feature
2020-12-27 11:32:52 +01:00
Francesco Abbate
9a12d47afd
Add HOME directory expansion also for open file command
2020-12-20 00:31:49 +01:00
Francesco Abbate
4401f33c19
Move HOME expand/encode into common module
2020-12-19 23:53:29 +01:00
Francesco Abbate
35c87462a6
Use ~ for HOME directory in folder search
2020-12-19 16:31:42 +01:00
Francesco Abbate
9114148b45
Automatically reload style when saving the project user module
2020-12-10 17:56:53 +01:00
Francesco Abbate
6409b67ea2
Add core:restart function to restart the editor
2020-12-10 12:44:01 +01:00
Francesco Abbate
e88adc0567
Move project manager into core init file
2020-12-08 16:57:57 +01:00
Francesco Abbate
3589d7d3c0
First implementation of unix-like data directory
...
It basically works by setting the data directory to
$prefix/share/lite-xl
where $prefix is determined so that $prefix/bin corresponds to EXEDIR.
The packages 'user' and 'user.*' are loaded from the directory
'$HOME/.config/lite-xl'.
2020-12-02 00:23:15 +01:00
Francesco Abbate
bdaddea29a
Fix behavior when using un-indent command over multiple lines
2020-11-18 15:52:53 +01:00
Francesco Abbate
1db0f703e7
Merge remote-tracking branch 'origin/master'
2020-11-17 10:28:20 +01:00
Francesco Abbate
82dc76dd00
Add recently visited files in the list when using find file command
2020-11-16 23:52:51 +01:00
Francesco Abbate
121f0e1aa0
Improve behavior for indent command with selection over multiple lines
...
Do not add indentation for the last line is not selected.
2020-11-16 11:52:41 +01:00
rxi
de5cb4fa52
Improved behaviour of `doc:join-lines` when joining to empty line
2020-09-27 15:03:53 +01:00
rxi
bd0644a5bb
Added resetting of selection on intermediate find-text failure
2020-06-04 14:04:46 +01:00
rxi
db8c5ea2aa
Renamed core:command/file-finder => core:find-command/file
2020-05-30 09:11:42 +01:00
rxi
1b2fda2825
Changed block movement to mimic word movement
2020-05-28 13:55:25 +01:00
rxi
9c652086e8
Improved behaviour of and renamed `translate.next|previous_word_boundary`
2020-05-28 11:57:53 +01:00
rxi
bc4bf3d384
Added core.set_active_view(); removed `focusable` boolean from View
2020-05-19 14:55:46 +01:00
rxi
4ae0d477c0
Made lite set project dir to CWD; removed core.project_dir
...
Fixes #100
2020-05-17 17:05:56 +01:00
rxi
ed86f7d04e
Fixed find-replace:select-next erroring on multiline selection
2020-05-12 20:05:17 +01:00
rxi
70f62f3c8a
Added `doc:rename` command; changed command_view:set_text to take `select` argument
2020-05-09 16:09:07 +01:00
rxi
7479c1380d
Added commands `root:shrink` and `root:grow`
2020-05-09 14:40:26 +01:00
rxi
b08f870f47
Added stripping of carriage-returns when pasting
2020-05-09 14:22:13 +01:00
rxi
31820b36ef
Moved `syntax` from `doc.highlighter` to `doc`
2020-05-08 20:29:22 +01:00
rxi
2642f7443f
Added default text to find-replace's "new text" input
2020-05-08 13:55:23 +01:00
rxi
1d2a0aada5
Made `doc:toggle-line-comments` command skip empty lines
2020-05-08 09:07:13 +01:00
rxi
bf8565d2a1
Fixed `doc:toggle-line-comments` for syntax highlighter relocation
2020-05-07 23:11:04 +01:00
rxi
596b40c741
Made `find-replace:find-symbol` use first symbol in sel as default
2020-05-07 10:55:11 +01:00
rxi
5361bfaf9c
Added open-[project|user]-module commands, renamed command/file finder commands
2020-05-06 14:48:04 +01:00
rxi
0967740d88
Improved findreplace replace log and commandview text
2020-05-02 14:45:33 +01:00
rxi
5155ce0527
Added `replace-symbol` command to findreplace plugin
2020-05-02 11:14:07 +01:00
rxi
28cdd3cabe
Minor cleanup in core.statusview and core.commands.core
2020-05-01 20:17:10 +01:00
rxi
4ca35fe056
Added command `doc:select-none`, added binding to `escape`
2020-05-01 19:25:17 +01:00
rxi
ab8510291e
Added find-replace:select-next, bound to ctrl+d by default
2020-05-01 10:21:57 +01:00
rxi
accf09c4f9
Changed printed filenames to use format-specifier "%s" instead of %q
...
Fixes #22
2020-04-25 13:26:55 +01:00
rxi
c658b6f1ca
Removed underscore from start of globals, added VERSION
...
eg. `_SCALE` => `SCALE`
prevents conflict with lua's own _NAME globals
2020-04-25 09:58:01 +01:00
rxi
7046bfca24
Made cut/copy no-op if there is no selection
2020-04-12 11:22:16 +01:00
rxi
d4284edd5c
Replaced system.set_fullscreen with system.set_window_mode
...
Solves #24
2020-04-07 18:49:11 +01:00
rxi
efed38d59c
Added system.set_fullscreen() and core:toggle-fullscreen command
2020-03-25 22:44:59 +00:00
Sergei V. Rogachev
7e868e14e6
Fixed root:switch-to-* command
...
Before the fix navigation between nodes in the root
view was broken: the scale factor wasn't taken into
account. Switching in the right and down directions
was impossible for scale factors greater than one.
2020-02-01 17:56:47 +03:00
rxi
d8c4bfa6ba
Initial commit
2019-12-28 11:17:56 +00:00