Maxime Coste
bcba5287ad
Add complete_command for completing commands in PATH
...
use it for pipe completion
2013-12-23 20:43:55 +00:00
Maxime Coste
39512914ad
Add BufWritePre and BufWritePost hooks
2013-12-11 13:58:38 +00:00
Maxime Coste
60dbec4949
Add Buffer::reload for reloading buffers without loosing options and hooks
2013-10-21 18:57:19 +01:00
Maxime Coste
44281c8fed
More robust Buffer filesystem timestamp handling
2013-10-17 18:47:09 +01:00
Maxime Coste
03c74b7a88
Detect file external modification and ask the user whether to reload or not
...
* Buffer now store a m_fs_timestamp field.
* Client in Normal mode checks current buffer file every 500 ms, or
each time it goes back to Normal mode.
2013-10-15 18:51:31 +01:00
Maxime Coste
60f4e1104f
complete_filename fallback on subsequence completion if prefix does not work
2013-09-24 10:16:47 +02:00
Maxime Coste
5ae43acf94
Add prefix_match function and use it instead of adhoc code
2013-09-23 21:16:25 +02:00
Maxime Coste
eedd37c09a
memoryview: always pass by value
2013-07-26 01:50:36 +02:00
Maxime Coste
c6bf0b4cc3
add missing errno include to file.cc
2013-06-19 19:29:05 +01:00
Maxime Coste
580749a91d
Buffer: remove line_length and replace line_content with operator[]
2013-06-06 19:44:07 +02:00
Maxime Coste
4a0aa96160
fix bug in compact_path
2013-04-29 13:49:47 +02:00
Maxime Coste
d49f35817e
fix handling of ~ in filenames so that :edit ~ does not open a file named '~'
2013-04-26 20:18:16 +02:00
Maxime Coste
9999e5698d
Use the buffer manager to delete buffer, throw when a client is inserting
2013-04-10 18:54:01 +02:00
Maxime Coste
270e950cf1
sort includes directives
2013-04-09 20:05:40 +02:00
Maxime Coste
ce67d29871
Always use absolute path for file buffer names, compact paths for display
2013-03-25 19:11:26 +01:00
Maxime Coste
0082238c75
use canonicalized filenames for buffers
2013-03-22 14:27:30 +01:00
Maxime Coste
e5d93c2194
BufferManager: replace Buffer* get_buffer with Buffer& get_buffer
2013-03-21 19:09:31 +01:00
Maxime Coste
50d9c4dfda
add support for regex options, make ignored_files one
2013-03-14 13:42:07 +01:00
Maxime Coste
b309d1df61
move complete_filename to file.cc
2013-03-13 19:39:38 +01:00
Maxime Coste
4069f42845
find_file: automatically add missing '/' and end of paths
2013-03-13 18:52:08 +01:00
Maxime Coste
fac222a427
Strongly typed options support
...
* non builtins options require declaration using the decl command
* At the moment, only int and string options are supported, however
the goal of this change is to provide a consistent way to support
more complex options, namely lists and booleans
2013-03-05 18:49:26 +01:00
Maxime Coste
09901d455e
Add 'gf' (goto file) functionality
2013-02-27 19:58:38 +01:00
Maxime Coste
479bb9df2c
fail nicely when trying to open a directory
2012-12-05 13:59:08 +01:00
Maxime Coste
52ee8b46ae
fix crlf file reading
2012-11-26 13:36:43 +01:00
Maxime Coste
9c99c238e8
rewrite file opening code using mmap, opening big files is much much faster
2012-11-23 18:43:10 +01:00
Maxime Coste
3b5530ac09
rename (hook|option)_manager to (hook|option)s.
...
And Global(Hook|Option)Manager to Global(Hook|Option)s
2012-11-22 13:50:29 +01:00
Maxime Coste
d1fade5c9e
Buffer: replace reset_undo_data with a NoUndo flag
2012-11-21 13:43:10 +01:00
Maxime Coste
8bbfbc8c72
Buffer: replace Buffer::Type with Buffer::Flags
2012-11-20 19:47:56 +01:00
Maxime Coste
713fa9d406
more exception safety with file descriptors
2012-11-20 18:52:36 +01:00
Maxime Coste
6ff6058ceb
create_buffer_from file return nullptr on file not found instead of throwing
2012-10-16 14:59:39 +02:00
Maxime Coste
0ce6bd9bf5
use ByteCount instead of CharCount when we are really counting bytes
...
(that is most of the time when we are not concerned with displaying)
2012-10-11 00:41:48 +02:00
Maxime Coste
a467d73115
use parse_filename when opening files or completing filenames so that ~ and env vars are handled
2012-09-12 19:42:12 +02:00
Maxime Coste
f9e31856cf
Buffer: Allow inserting at the end when the inserted text ends with an end of line
...
Adapted other code in consequence and added unit tests so that this behavior
is maintained.
2012-09-10 19:26:17 +02:00
Maxime Coste
e4fd839dda
use a strongly typed int CharCount for character counts
2012-08-23 23:56:35 +02:00
Maxime Coste
0d8cce2728
use a strongly typed int LineCount for line counts
2012-08-22 23:33:52 +02:00
Maxime Coste
7cc5ff7c73
fix create_buffer_from_file when file does not exists
2012-08-17 18:52:04 +02:00
Maxime Coste
4e34f777b0
Buffer: stronger invariant, a buffer is never empty and all lines finish by '\n'
2012-08-14 14:13:10 +02:00
Maxime Coste
759319ca44
Buffer: move back Modification as an implementation detail
...
* Filters now only works on insertion and take directly the
iterator and content
* use Buffer::insert and Buffer::erase to modify a buffer
2012-08-10 19:12:43 +02:00
Maxime Coste
44621bff11
detect byte order mark in buffers, and write back
2012-08-10 18:48:21 +02:00
Maxime Coste
d81a100a85
support crlf line ending when reading and writing buffers
2012-08-10 14:24:13 +02:00
Maxime Coste
d7c917c96e
include <unistd.h> in order to get read and write
2012-05-30 14:19:53 +02:00
Maxime Coste
b8fe942dbb
Implement our own String class in preparation to encoding support.
2012-04-14 01:23:20 +00:00
Maxime Coste
9337938403
replace std::string references with String
2012-04-14 01:17:09 +00:00
Maxime Coste
0ba7c7286d
Store buffer content in a list of lines
...
Instead of a big std::string, buffer now store it's content in a
list of lines. In order to achieve O(log(n)) random access, lines
contains both their content and their offset since the start of
the file, making binary search usable.
BufferIterator now have a LineAndColumn coordinate into the buffer
instead of an offset so that access is still O(1).
2012-03-30 11:37:18 +00:00
Maxime Coste
792f0f7f2e
BufferManager no longer owns buffers, only register them
2012-03-26 14:21:49 +00:00
Maxime Coste
df0f7b4689
rename BufferString to String
2012-03-08 21:23:29 +00:00
Maxime Coste
73a8950e73
File: parse_filename function which handle ~ and environment variable in filenames
2012-01-29 22:24:43 +00:00
Maxime Coste
6fa5d809ef
whitespace fix
2011-12-22 13:33:29 +00:00
Maxime Coste
de19aeb035
File: extract read_file function which returns file content in a string
2011-11-27 12:56:38 +00:00
Maxime Coste
9db4aa9691
Buffer: add a type property
2011-10-07 14:15:55 +00:00