Commit Graph

6389 Commits

Author SHA1 Message Date
Anmol Sethi
64013a5deb man.vim: small syntax improvements (#5170) 2016-08-06 16:17:31 -04:00
Justin M. Keyes
4dc4efc36f Merge #4449 'man.vim' 2016-08-04 23:53:11 -04:00
Justin M. Keyes
66ceb5a487 man.vim: doc, UX tweaks
s:error: Convention is to highlight the entire message, so stick to that.
2016-08-04 23:52:52 -04:00
Anmol Sethi
42e9606c23 man.vim: rewrite
- Smart autocomplete. It's automatically sorted, filtered for duplicates
  and even formats the candidates based on what is needed. For example,
  `:Man 1 printf<TAB>` will show the pages that are in section 1m as
  'page(sect)' to let you know they are in a more specific section.
- Instead of trying to unset $MANPAGER we use the -P flag to set the
  pager to cat
- Always use the section arg '-s', it makes the code much simpler
  (see comment in s:man-args).
- A manpage name starting with '-' is invalid. It's fine for sections
  because of the use of '-s'.

- The tagstack is an actual stack now, makes it much simpler.
- By using v:count and v:count1, the plugin can explicitly check whether
  the user set a count, instead of relying on a default value (0) that
  is actually a real manpage section.
- Extraction of a manpage reference is much more simple. No giant long
  complicated regexes. Now, the plugin lets `man` handle the actual
  validation. We merely extract the section and page. Syntax regexes are
  a bit more specific though to prevent highlighting everything.
- Multilingual support in the syntax file. Removed the cruft that was only
  relevent to vim. Also simplified and improved many of the regexes.

- Using shellescape when sending the page and sect as arguments
- In general, the code flow is much more obvious.
- man#get_page has been split up into smaller functions with explicit
  responsibilties
- ':help' behavior in opening splits and manpages
- Comments explaining anything that needs explaining and isn't
  immediately obvious.
- If a manpage has already been loaded but if it were to reloaded at the
  current width which is the same as the width at which it was loaded at
  previously, it is not reloaded.

- Use substitute to remove the backspaced instead of `col -b`, as the
  latter doesn't work with other languages.
- Open paths to manpages
- It uses cWORD instead of cword to get the manpage under the cursor, this
  helps with files that do not have (,) in iskeyword. It also means the
  plugin does not set iskeyword locally anymore.
- <Plug>(Man) mapping for easy remapping
- Switched to single quotes wherever possible.
- Updated docs in $VIMRUNTIME/doc/filetype.txt (still need to update
  user-manual)

- Always call tolower on section name. See comment in
  s:extract_page_and_sect_fpage
- Formatting/consistency cleanup
- Automatically map q to ':q<CR>' when invoked as $MANPAGER
- It also fully supports being used as $MANPAGER. Setting the name and
  stuff automatically.
- Split up the setlocals into multiple lines for easier readability
- Better detection of errors by redirecting stderr to /dev/null. If an
  error occured, stdout will be empty.

- Functions return [sect, page] not [page, sect]. Makes more sense with
  how man takes the arguments as sect and then page.
- Pretty prints errors on a single line.
- If no section is given, automatically finds the correct section for
  the buffer name. It also gets the correct page. See the comment in
  s:get_page
- If $MANWIDTH is not set, do not assign directly to $MANWIDTH because
  then $MANWIDTH will always stay set to the same value as we only use
  winwidth(0) when the global $MANWIDTH is empty. Instead we set it
  locally for the command.
- Maintainer notes on all files.
2016-08-04 22:46:53 -04:00
Anmol Sethi
a8e973dea6 ex_messages: remove 'Messages maintainer' (#5160) 2016-08-04 21:01:32 -04:00
Justin M. Keyes
fe6ec75725 Merge #4964 from ZyX-I/no-xdg-expand
option: Do not expand options, obtained from XDG vars
2016-08-04 20:59:51 -04:00
Justin M. Keyes
d622e9c416 Merge #5159 from justinmk/readfile-readonly-check 2016-08-04 19:18:59 -04:00
Justin M. Keyes
a8d1b5f721 readfile(): readonly: Also check "not writable". 2016-08-04 19:02:33 -04:00
Shougo Matsushita
b8c27a83b3 readfile(): Less-destructive readonly check.
Fixes #4162
Fixes #4200
Closes #4944

Regression by 4a138137f7. That commit mentions
a "possible race condition" but the cost isn't worth the (unexplained) gain.
2016-08-04 19:01:52 -04:00
Björn Linse
5a8ae8d3fe Merge pull request #5148 from munyari/vim-7.4.1603
[RFC] version.c: add completed patches
2016-08-04 21:31:33 +02:00
prollings
0d93cd6c46 vim-patch:7.4.1557 (#5117)
Problem:    Windows cannot be identified.
Solution:   Add a unique window number to each window and functions to use it.

86edef664e
2016-08-04 00:22:45 -04:00
Panashe Fundira
08d11bd42f vim-patch:7.4.1673 (#5141)
Problem:    The justify plugin has to be copied or sourced to be used.
Solution:   Turn it into a package.

2946d0236d

Justification for changes that do not carry over

- `Filelist` does not exist in neovim
- neovim does not have a `README.txt` in `runtime/macros`
2016-08-03 08:07:28 -04:00
Panashe M. Fundira
e0e15360b8
version.c: add completed patches 2016-08-01 18:10:45 -04:00
Rui Abreu Ferreira
f53c8258be MinGW Appveyor builds
- Build for MinGW x86/x86_64. Move build scripts out of the yml file into
  separate batch files.
- The MinGW builds use MSYS to get runtime dependencies, but they do not
  link against the POSIX adaptation layer.
- For now only build the nvim.exe binary, but not the helptags.
2016-08-01 12:57:58 +01:00
Rui Abreu Ferreira
55682710a9 Travis: Remove MinGW builds
MinGW builds in Travis have been disabled for a while now, and some
of the upcoming patches will break cross compilation even further.
2016-08-01 12:57:58 +01:00
Justin M. Keyes
ba705042ff Merge #4837 from justinmk/os_resolve_shortcut
os_resolve_shortcut
2016-08-01 05:27:20 -04:00
Justin M. Keyes
d1d9ac5a3c doc: mention tnoremap
Closes #5097
2016-08-01 04:58:40 -04:00
Michael Ennen
6fe8c1d051 vim-patch:7.4.1305 #5094
Problem:    "\%1l^#.*" does not match on a line starting with "#".
Solution:   Do not clear the start-of-line flag. (Christian Brabandt)

7c29f38781

Helped-by: jamessan
Helped-by: mhinz
2016-08-01 03:59:04 -04:00
Shougo Matsushita
23f591dba0 [RFC] vim-patch:7.4.2011, vim-patch:7.4.2012, vim-patch:7.4.2066 #5106
vim-patch:7.4.2011

Problem:    It is not easy to get a list of command arguments.
Solution:   Add getcompletion(). (Yegappan Lakshmanan)

aa4d73235b

vim-patch:7.4.2012

Problem:    Test for getcompletion() does not pass on all systems.
Solution:   Only test what is supported.

0d3e24be56

vim-patch:7.4.2066

Problem:    getcompletion() not well tested.
Solution:   Add more testing.

c1fb763184
2016-08-01 03:33:38 -04:00
Panashe M. Fundira
70ae6ac344 vim-patch:7.4.1676 #5143
Problem:    The shellmenu plugin has to be copied or sourced to be used.
Solution:   Turn it into a package.

fead3ac9a3

Justification for changes that do not carry over

- `Filelist` does not exist in neovim
- neovim does not have a `README.txt` in `runtime/macros`
2016-08-01 03:25:03 -04:00
Panashe M. Fundira
247d1cec06 vim-patch:7.4.1675 #5142
Problem:    The swapmous plugin has to be copied or sourced to be used.
Solution:   Turn it into the swapmouse package.

e101204906

Justification for changes that do not carry over

- `Filelist` does not exist in neovim
- neovim does not have a `README.txt` in `runtime/macros`
2016-08-01 03:23:21 -04:00
Shougo Matsushita
172cf079c7 vim-patch:7.4.2013, vim-patch:7.4.2014
vim-patch:7.4.2013

Problem:    Using "noinsert" in 'completeopt' breaks redo.
Solution:   Set compl_curr_match. (Shougo, closes vim/vim#874)

67081e5061

vim-patch:7.4.2014

Problem:    Using "noinsert" in 'completeopt' does not insert match.
Solution:   Set compl_enter_selects. (Shougo, closes #875)

32b808a4bd
2016-08-01 03:07:49 -04:00
Justin M. Keyes
2cd3a2d1d8 Merge #4634 'version.c: update' 2016-07-30 18:07:00 -04:00
Simon Weil
af95037c96 vim-patch:7.4.1237 (#5092)
Problem:    Can't translate message without adding a line break.
Solution:   Join the two parts of the message.

d9ea9069f5
2016-07-31 14:39:08 -04:00
Justin M. Keyes
aa2c439940 eval.c: rename capture() to execute() (#5132) 2016-07-31 13:23:29 -04:00
Justin M. Keyes
f4187c46bd version.c: update 2016-07-30 18:06:27 -04:00
Justin M. Keyes
02346f9bc7 os_resolve_shortcut: Report conversion error. 2016-07-30 15:28:13 -04:00
Justin M. Keyes
f2d5ba65b5 mbyte.c: Move utf8/utf16 functions to mbyte.c 2016-07-30 15:28:13 -04:00
Justin M. Keyes
23aadb6948 utf16_to_utf8 2016-07-30 15:28:13 -04:00
Justin M. Keyes
d96b359410 os_resolve_shortcut: cleanup 2016-07-30 15:28:12 -04:00
Justin M. Keyes
618aad3811 os_resolve_shortcut: Remove legacy win16 codepath. 2016-07-30 15:28:12 -04:00
Justin M. Keyes
6b33e9b103 utf8_to_utf16: adapt libuv's fs__capture_path 2016-07-30 15:28:12 -04:00
Justin M. Keyes
771d42e426 os_resolve_shortcut: initial port from Vim source 2016-07-30 15:28:12 -04:00
Tommy Allen
faca814116 matchit.vim: preserve jumplist (#5124) 2016-07-30 12:48:40 -04:00
Florian Walch
9b210c1fa9 Merge pull request #5076 from fwalch/travis/osx-deps
Travis: Use caching instead of pre-compiled deps for OSX.
2016-07-30 17:58:22 +02:00
Florian Walch
3455e66cfc Travis: Build 3rd-party dependencies with system's default compiler.
Using GCC 4.9 for building the dependencies caused some linker error on
OS X.
2016-07-30 10:21:04 +02:00
Florian Walch
3d1084f264 Travis: Fix accidental building of 3rd-party dependencies.
Running tests from the top-level Makefile will use the third-party
dependencies from .deps instead of the ones from the Travis cache.
2016-07-30 10:21:04 +02:00
Florian Walch
66a4c95866 Travis: Use caching instead of pre-compiled deps for OSX. 2016-07-30 10:21:04 +02:00
KillTheMule
bd8ef4ea24 test: fix 2016-07-29 08:58:27 -04:00
Rui Abreu Ferreira
c168dc32b9 Remove redundant includes of unistd.h (#5126) 2016-07-29 08:53:01 -04:00
Justin M. Keyes
149518c6b3 doc: gentle transition steps; stub XDG section
Closes #4951
2016-07-29 00:51:02 -04:00
Justin M. Keyes
e5781d005a Merge #2850 2016-07-28 18:51:06 -04:00
KillTheMule
7a56967f8c A bit of linting 2016-07-28 18:50:34 -04:00
Tommy Allen
1f7304b846 mouse.c: Adjust clicked column if chars are concealed (#5087)
syntax.c: Added syn_get_concealed_id()

tests: Added tests for mouse clicks on concealed text.
2016-07-28 14:14:53 -04:00
E Kawashima
56f178058a man: fix description of XDG_DATA_HOME (#5120)
If not set `XDG_DATA_HOME` is defaulted to `~/.local/share`; the data are stored under the `$XDG_DATA_HOME/nvim`.
2016-07-27 08:52:35 -04:00
Shougo Matsushita
ea690e4038 version.c: Update to 7.4.2107
1601: Filelist, Makefile
1602: info files
1609: Filelist
1610: if_ole, directX
1611: FEAT_VERTSPLIT
1612, 1613: small feature
1615: tiny feature
1616-1618, 1621-1628, 1631, 1635: channel fix
1632, 1633: Makefile fix
1636: getln.c
1646: Python eval
1651: MS-DOS
1655: remote_expr() fix
1657, 1659, 1661, 1662, 1665-1669, 1680: channel
1672, 1674: dvorak plugin
1678: if_mzch
1683: dosinst.c
1684: README
1687, 1717, 1722: channel
1688: if_mzch
1689: if_ruby
1690: ifdef
1693: if_perl
1694: Win32 GUI
1698: Makefile
1705: guifont in Windows
1706: __ARGS
1709: ifdef
1713: GTK GUI
1721: vimtbar plugin
1724: tabline with GUI
1725: fix for ANSI C
1726: compiler warning for ex_smile
1729, 1746: if_perl
1733: Makefile
1736, 1743, 1744, 1747: if_python
1737: UNUSED
1745: README
1749: GTK
1756: dll path
1760: compiler warnings
1764: job
1766: INSTALL_pc.txt
1767: configure
1770: true color
1771: ifdef
1772, 1775: Makefile
1773: compiler warnings
1774, 1778: true color
1776: term.c
1777: channel
1784: true color
1786: term.c
1787, 1789-1791: channel
1788: NSIS support
1794: Win32 GUI
1795-1798: term.c
1800: ifdef
1801: Makefile
1803: GTK3
1807, 1810, 1811, 1814, 1817, 1822, 1824-1829: channel
1819: Compiler warning
1830: os_mswin.c
1843: if_python
1845: channel
1846: term.c
1848: if_perl
1849, 1850, 1853, 1855-1859: channel
1852: GUI test
1854: termguicolors
1860: timer
1863: if_xxx
1864: if_python
1865: eval.c leak
1869: if_perl
1870: if_mzch
1872: if_perl
1873: timer in GUI
1874: Win32
1877-1880: channel
1883: ViVim, gui_mac
1885: MinGW
1886, 1887: channel
1890: GUI
1891: channel
1892, 1894: balloon
1899: GUI_GTK
1901: GUI_Win32
1902, 1906: channel
1908: NetBeans
1915: gui_menu
1916: test_channel
1917-1921: viminfo
1922: if_ruby
1924: function(void)
1925, 1926, 1931-1933, 1938, 1939, 1943: viminfo
1927: if_mzch
1929: if_ruby
1930: ifdef
1934: Makefile
1935: GUI
1942: termguicolors
1944: Make_MSVC
1946: Filelist
1947: viminfo
1951: Makefile, if_ruby
1957, 1958: if_perl
1959: channel
1963: Win32 cygpty
1965, 1969: channel
1974: GUI
1982, 1987, 1988: viminfo
1983: Filelist Makefile ifdef protocol
1985: VMS build filename_upper_camel
1995: GUI
1998: channel
2001: ifdef
2003, 2004: cursor flicker in GUI
2016: Make_cyg
2020: ifdef
2025: GUI_GTK
2026: channel
2027: ifdef
2030, 2032, 2034: Make cygwin MinGW
2035: ACL support
2037, 2038: small build
2039-2041: channel
2042: GUI_GTK
2045: channel
2048: legacy
2052, 2053: Makefile
2054: ifdef
2055, 2057, 2063: eval.c refactoring
2056: prototype
2059, 2060: Makefile
2070: spell.h
2078: term.c
2079: test_netbeans
2089, 2092: GUI
2091: term.c
2102: GUI tiny
2105: configure

Included
1732: auto completion folds
2016-07-27 19:53:31 +09:00
David Personette
67062d20ed
CMake: fix USE_BUNDLED_LIBUV
Closes #5114.
2016-07-25 20:56:52 +02:00
Hirokazu Hata
fbb2cd791d vim-patch:7.4.1179 (#5112)
Problem:    test_writefile and test_viml do not delete the tempfile.
Solution:   Delete the tempfile. (Charles Cooper)  Add DeleteTheScript().

f4f79b84a5
2016-07-25 08:12:24 -04:00
James McCoy
2bb4c43f2f Merge pull request #5020 from jamessan/vim-7.4.1663
vim-patch:7.4.1663,7.4.1682,7.4.1703
2016-07-24 12:29:06 -05:00
James McCoy
a4987bac3e lint 2016-07-23 20:42:46 -04:00