Bug 198728 - [editors/vim] Setting g:is_posix=1 as default because BSD shell has certain POSIX syntax in /bin/sh
Summary: [editors/vim] Setting g:is_posix=1 as default because BSD shell has certain P...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-20 10:12 UTC by Yuri Victorovich
Modified: 2015-03-28 16:25 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
patch (385 bytes, patch)
2015-03-20 10:12 UTC, Yuri Victorovich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2015-03-20 10:12:04 UTC
The attached patch corrects the problem when valid syntax like this:
> val=$((some_variable - 1))
> val=$(some_function_or_command)
> val=$(${SOME_VAR} arg1 arg2)
is marked as red in syntax highlighter, because $() is the POSIX feature, and vim needs this enabled. Since BSD runs such shell, it makes sense to enable it by default.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2015-03-20 10:12:34 UTC
Created attachment 154560 [details]
patch
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-03-28 16:12:40 UTC
A commit references this bug:

Author: sunpoet
Date: Sat Mar 28 16:12:12 UTC 2015
New revision: 382520
URL: https://svnweb.freebsd.org/changeset/ports/382520

Log:
  - Add "let: g:is_posix = 1" to default vimrc
  - Bump PORTREVISION for package change

  PR:		198728
  Submitted by:	<yuri@rawbw.com>

Changes:
  head/editors/vim/Makefile
  head/editors/vim/files/vimrc
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2015-03-28 16:25:06 UTC
Committed. Thanks!