├── ftdetect └── qvs.vim ├── README.md ├── LICENSE └── syntax └── qvs.vim /ftdetect/qvs.vim: -------------------------------------------------------------------------------- 1 | " QVS 2 | autocmd BufNewFile,BufRead *.{qvs} set filetype=qvs 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Qlikview Vim Syntax 2 | 3 | Vim syntax highlighting for Qlikview 4 | A quick implementation of Qlikview syntax for Vim. 5 | 6 | Functions from Qlik documentation. 7 | 8 | chrnogueira@gmail.com 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 ChristianNogueira 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /syntax/qvs.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: Qlikview 3 | " Maintainer: Christian Stickel Nogueira 4 | " Last Change: 2025, Sep 5 | " Version: 1.0.1 6 | " Description: updated release 7 | " 8 | if version < 600 9 | syntax clear 10 | elseif exists("b:current_syntax") 11 | finish 12 | endif 13 | 14 | syn case ignore 15 | 16 | syn keyword qvsStatement CALL RESIDENT NOCONCATENATE MAPPING WHERE LOAD FROM FOR IF END ELSE STORE DROP NEXT SUB FIRST TO TABLE THEN AND ORDER BY GROUP RENAME FIELD INLINE DISTINCT AUTOGENERATE WHILE AS SQL 17 | syn keyword qvsKeyItems SET LET EXIT TRACE 18 | 19 | syn keyword qvsSqlStatement select where and or execute 20 | 21 | syn keyword qvsAggregateFunction sum min max only mode firstsortedvalue 22 | syn keyword qvsAggregateFunction MinString MaxString FirstValue LastValue concat 23 | syn keyword qvsAggregateFunction count NumericCount TextCount NullCount MissingCount 24 | syn keyword qvsAggregateFunction fractile kurtosis correl avg stdev skew median sterr steyx linest_m linest_b linest_r2 linest_sem linest_seb linest_sey linest_df linest_f linest_ssreg linest_ssresid 25 | syn keyword qvsAggregateFunction irr xirr npv xnpv 26 | syn keyword qvsAggregateFunction chi2test_p chi2test_df chi2test_chi2 TTest_t TTest_df TTest_sig TTest_dif TTest_sterr TTest_conf TTest_lower TTest_upper TTestw_t TTestw_df TTestw_sig TTestw_dif 27 | syn keyword qvsAggregateFunction TTestw_sterr TTestw_conf TTestw_lower TTestw_upper TTest1_t TTest1_df TTest1_sig TTest1_dif TTest1_sterr TTest1_conf TTest1_lower TTest1_upper TTest1w_t TTest1w_df 28 | syn keyword qvsAggregateFunction TTest1w_sig TTest1w_dif TTest1w_sterr TTest1w_conf TTest1w_lower TTest1w_upper ZTest_z ZTest_sig ZTest_dif ZTest_sterr ZTest_conf ZTestw_z ZTestw_sig ZTestw_dif 29 | syn keyword qvsAggregateFunction ZTestw_sterr ZTestw_conf 30 | 31 | syn keyword qvsGeneralFunction div mod fmod ceil floor frac round fabs numsum numcount numavg nummin nummax fact combin permut even odd sign bitcount concatenate 32 | 33 | syn keyword qvsScriptRangeFunction rangesum rangeavg rangecount rangemin rangemax rangestdev rangeskew rangekurtosis rangefractile rangenumericcount rangetextcount rangenullcount rangemissingcount 34 | syn keyword qvsScriptRangeFunction rangeminstring rangeminstring rangemode rangeonly rangecorrel rangeirr rangenpv rangexirr rangexnpv 35 | 36 | syn keyword qvsExpLogFunction exp log log10 sqrt sqr pow 37 | 38 | syn keyword qvsTrigonometricFunction cos acos sin asin tan atan atan2 cosh sinh tanh 39 | 40 | syn keyword qvsStatisticalFunction chidist chiinv normdist norminv tdist tinv fdist finv 41 | 42 | syn keyword qvsFinancialFunction fv nper pmt pv rate BlackAndSchole 43 | 44 | syn keyword qvsMathConstants e pi rand true false 45 | 46 | syn keyword qvsCounterFunction RecNo RowNo IterNo autonumber autonumberhash128 autonumberhash256 fieldvaluecount 47 | 48 | syn keyword qvsStringFunction ord chr len left right mid index upper lower repeat ltrim rtrim subfield KeepChar PurgeChar capitalize evaluate TextBetween Replace FindOneOf hash128 hash160 hash256 49 | syn keyword qvsStringFunction substringcount applycodepage 50 | 51 | syn keyword qvsMapFunction applymap mapsubstring 52 | 53 | syn keyword qvsInterRecordFunction exists previous peek FieldValue FieldIndex lookup 54 | 55 | syn keyword qvsConditionalFunction if alt pick match mixmatch wildmatch class 56 | 57 | syn keyword qvsLogicalFuction IsNum IsText IsPartialReload Null IsNull 58 | 59 | syn keyword qvsSystemFuction ClientPlatform OSuser QVuser ComputerName ReloadTime GetActiveSheetID GetCurrentField GetFieldSelections GetSelectedCount GetPossibleCount GetExcludedCount 60 | syn keyword qvsSystemFuction GetAlternativeCount GetNotSelectedCount GetRegistryString qlikviewversion MsgBox Input DocumentName DocumentPath DocumentTitle GetObjectField GetExtendedProperty 61 | 62 | syn keyword qvsFileFunction Attribute ConnectString filebasename filedir fileextension filename filepath filesize filetime GetFolderPath QvdCreateTime QvdNoOfRecords QvdNoOfFields QvdFieldName 63 | syn keyword qvsFileFunction QvdTableName 64 | 65 | syn keyword qvsTableFunction FieldName FieldNumber NoOfFields NoOfRows NoOfTables TableName TableNumber 66 | 67 | syn keyword qvsDocumentFuction TableNumber ReportName ReportID ReportNumber NoOfReports 68 | 69 | syn keyword qvsDateTimeFunction second minute hour day week month year weekyear weekday now today LocalTime MakeDate MakeWeekDate MakeTime AddMonths YearToDate TimeZone GMT UTC DaylightSaving 70 | syn keyword qvsDateTimeFunction SetDateYear SetDateYearMonth InYear InYearToDate InQuarter InQuarterToDate InMonth InMonthToDate InMonths InMonthsToDate InWeek InWeekToDate InLunarWeek 71 | syn keyword qvsDateTimeFunction InLunarWeekToDate InDay InDayToTime YearStart YearName QuarterStart QuarterEnd QuarterName MonthStart MonthEnd MonthName MonthsStart MonthsEnd MonthsName 72 | syn keyword qvsDateTimeFunction WeekStart WeekEnd WeekName LunarweekStart LunarweekEnd LunarWeekName DayStart DayEnd DayName age networkdays firstworkdate lastworkdate ConvertToLocalTime 73 | syn keyword qvsDateTimeFunction DayNumberOfYear DayNumberOfQuarter 74 | 75 | syn keyword qvsSystemVariables ThousandSep DecimalSep MoneyThousandSep MoneyDecimalSep MoneyFormat DirectMoneyDecimalSep DirectMoneyFormat TimeFormat DateFormat TimestampFormat MonthNames 76 | syn keyword qvsSystemVariables LongMonthNames DayNames LongDayNames 77 | 78 | syn keyword qvsFormatFunction Num Money Date Time Dual Interval timestamp 79 | 80 | " Strings and characters 81 | syn region qvsString start=+'+ end=+'+ 82 | syn region qvsVariable start=+$(+ end=+)+ 83 | 84 | " Numbers 85 | syn match qvsNumber "-\=\<\d*\.\=[0-9_]\>" 86 | syn match qvsNumber '\d\+' contained display 87 | syn match qvsNumber '[-+]\d\+' contained display 88 | syn match qvsNumber '\d\+\.\d*' contained display 89 | syn match qvsNumber '[-+]\d\+\.\d*' contained display 90 | 91 | " Inline tables 92 | " Handles only the "standard" use of [] as 93 | syn region qvsInlineTable start="\[" end="\]" 94 | 95 | " Comments 96 | syn region qvsTableName start=/^[a-zA-Z_\-1-9]/ end=/:/ 97 | syn region qvsComment start=/\/\// end=/$/ 98 | syn region qvsMultiComment start="/\*" end="\*/" contains=qvsMultiComment 99 | syn cluster qvsComment contains=qvsComment,qvsMultiComment 100 | 101 | hi def link qvsComment Comment 102 | hi def link qvsMultiComment Comment 103 | hi def link qvsNumber Number 104 | hi def link qvsString String 105 | 106 | hi def link qvsKeyItems Keyword 107 | hi def link qvsStatement Statement 108 | hi def link qvsSqlStatement Statement 109 | hi def link qvsMathConstants Statement 110 | hi def link qvsSystemVariables Statement 111 | hi def link qvsVariable Include 112 | hi def link qvsTableName Typedef 113 | 114 | hi def link qvsAggregateFunction Function 115 | hi def link qvsGeneralFunction Function 116 | hi def link qvsScriptRangeFunction Function 117 | hi def link qvsExpLogFunction Function 118 | hi def link qvsTrigonometricFunction Function 119 | hi def link qvsStatisticalFunction Function 120 | hi def link qvsFinancialFunction Function 121 | hi def link qvsCounterFunction Function 122 | hi def link qvsStringFunction Function 123 | hi def link qvsMapFunction Function 124 | hi def link qvsInterRecordFunction Function 125 | hi def link qvsConditionalFunction Function 126 | hi def link qvsLogicalFuction Function 127 | hi def link qvsSystemFuction Function 128 | hi def link qvsFileFunction Function 129 | hi def link qvsTableFunction Function 130 | hi def link qvsDocumentFuction Function 131 | hi def link qvsDateTimeFunction Function 132 | hi def link qvsFormatFunction Function 133 | let b:current_syntax = "qvs" 134 | --------------------------------------------------------------------------------