亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? namespaces.vim

?? vim的自動配置文件
?? VIM
?? 第 1 頁 / 共 2 頁
字號:
        let szBeginPart = remove(listNamespace, 0)        " Is 'Ns1' an alias ?        if has_key(a:mapNamespaceAlias, szBeginPart)            " Resolving alias 'Ns1'            " eg: Ns1 = NsResolved            let szResult = a:mapNamespaceAlias[szBeginPart]            " szEndPart = 'Ns2::Ns3'            let szEndPart = join(listNamespace, '::')            if szEndPart != ''                " Concatenation => szResult = 'NsResolved::Ns2::Ns3'                let szResult .= '::' . szEndPart            endif            " If a:szNamespace starts with '::' we add '::' to the beginning            " of the result            if match(a:szNamespace, '^::')>=0                let szResult = omni#cpp#utils#SimplifyScope('::' .  szResult)            endif        endif    endif    return szResultendfunc" Resolve namespace aliasfunction! s:ResolveAliasInNamespaceList(mapNamespaceAlias, listNamespaces)    call map(a:listNamespaces, 'omni#cpp#namespaces#ResolveAlias(a:mapNamespaceAlias, v:val)')endfunc" Get namespaces used at the cursor postion in a vim buffer" Note: The result depends on the current cursor position" @return"   -   List of namespace used in the reverse orderfunction! omni#cpp#namespaces#GetUsingNamespaces()    " We have to get local using namespace declarations    " We need the current cursor position and the position of the start of the    " current scope    " We store the cursor position because searchpairpos() moves the cursor    let result = []    let originalPos = getpos('.')    let origPos = originalPos[1:2]    let stopPos = s:GetStopPositionForLocalSearch()    let stopLine = stopPos[0]    let curPos = origPos    let lastLine = 0     let nextStopLine = origPos[0]    while curPos !=[0,0]        let curPos = searchpos('\C}\|\(using\s\+namespace\)', 'bW',stopLine)        if curPos!=[0,0] && curPos[0]!=lastLine            let lastLine = curPos[0]            let szLine = getline('.')            if origPos[0] == curPos[0]                " We get the line until cursor position                let szLine = szLine[:origPos[1]]            endif            let szLine = omni#cpp#utils#GetCodeFromLine(szLine)            if match(szLine, '\Cusing\s\+namespace')<0                " We found a '}'                let curPos = searchpairpos('{', '', '}', 'bW', g:omni#cpp#utils#expIgnoreComments)            else                " We get the namespace list from the line                let result = s:GetNamespaceListFromLine(szLine) + result                let nextStopLine = curPos[0]            endif        endif    endwhile    " Setting the cursor to the original position    call setpos('.', originalPos)    " 2) Now we can get all global using namespace declaration from the    " beginning of the file to nextStopLine    let result = omni#cpp#namespaces#GetListFromCurrentBuffer(nextStopLine) + result    " Resolving alias in the namespace list    " TODO: For the next release    "let g:omni#cpp#namespaces#CacheAlias= s:GetNamespaceAliasMap()    "call s:ResolveAliasInNamespaceList(g:omni#cpp#namespaces#CacheAlias, result)    return ['::'] + resultendfunc" Resolve a using namespace regarding the current context" For each namespace used:"   -   We get all possible contexts where the namespace"       can be define"   -   We do a comparison test of each parent contexts with the current"       context list"           -   If one and only one parent context is present in the"               current context list we add the namespace in the current"               context"           -   If there is more than one of parent contexts in the"               current context the namespace is ambiguous" @return"   - result item"       - kind = 0|1"           - 0 = unresolved or error"           - 1 = resolved"       - value = resolved namespacefunction! s:ResolveNamespace(namespace, mapCurrentContexts)    let result = {'kind':0, 'value': ''}    " If the namespace is already resolved we add it in the list of     " current contexts    if match(a:namespace, '^::')>=0        let result.kind = 1        let result.value = a:namespace        return result    elseif match(a:namespace, '\w\+::\w\+')>=0        let mapCurrentContextsTmp = copy(a:mapCurrentContexts)         let resolvedItem = {}        for nsTmp in  split(a:namespace, '::')            let resolvedItem = s:ResolveNamespace(nsTmp, mapCurrentContextsTmp)            if resolvedItem.kind                " Note: We don't extend the map                let mapCurrentContextsTmp = {resolvedItem.value : 1}            else                break            endif        endfor        if resolvedItem!={} && resolvedItem.kind            let result.kind = 1            let result.value = resolvedItem.value        endif        return result    endif    " We get all possible parent contexts of this namespace    let listTagsOfNamespace = []    if has_key(g:omni#cpp#namespaces#CacheResolve, a:namespace)        let listTagsOfNamespace = g:omni#cpp#namespaces#CacheResolve[a:namespace]    else        let listTagsOfNamespace = omni#common#utils#TagList('^'.a:namespace.'$')        let g:omni#cpp#namespaces#CacheResolve[a:namespace] = listTagsOfNamespace    endif    if len(listTagsOfNamespace)==0        return result    endif    call filter(listTagsOfNamespace, 'v:val.kind[0]=="n"')    " We extract parent context from tags    " We use a map to avoid multiple entries    let mapContext = {}    for tagItem in listTagsOfNamespace        let szParentContext = omni#cpp#utils#ExtractScope(tagItem)        let mapContext[szParentContext] = 1    endfor    let listParentContext = keys(mapContext)    " Now for each parent context we test if the context is in the current    " contexts list    let listResolvedNamespace = []    for szParentContext in listParentContext        if has_key(a:mapCurrentContexts, szParentContext)            call extend(listResolvedNamespace, [omni#cpp#utils#SimplifyScope(szParentContext.'::'.a:namespace)])        endif    endfor    " Now we know if the namespace is ambiguous or not    let len = len(listResolvedNamespace)    if len==1        " Namespace resolved        let result.kind = 1        let result.value = listResolvedNamespace[0]    elseif len > 1        " Ambiguous namespace, possible matches are in listResolvedNamespace    else        " Other cases    endif    return resultendfunc" Resolve namespaces"@return"   - List of resolved namespacesfunction! omni#cpp#namespaces#ResolveAll(namespacesUsed)    " We add the default context '::'    let contextOrder = 0    let mapCurrentContexts  = {}    " For each namespace used:    "   -   We get all possible contexts where the namespace    "       can be define    "   -   We do a comparison test of each parent contexts with the current    "       context list    "           -   If one and only one parent context is present in the    "               current context list we add the namespace in the current    "               context    "           -   If there is more than one of parent contexts in the    "               current context the namespace is ambiguous    for ns in a:namespacesUsed        let resolvedItem = s:ResolveNamespace(ns, mapCurrentContexts)        if resolvedItem.kind            let contextOrder+=1            let mapCurrentContexts[resolvedItem.value] = contextOrder        endif    endfor    " Build the list of current contexts from the map, we have to keep the    " order    let mapReorder = {}    for key in keys(mapCurrentContexts)        let mapReorder[ mapCurrentContexts[key] ] = key    endfor    let result = []    for key in sort(keys(mapReorder))        call extend(result, [mapReorder[key]])    endfor    return resultendfunc" Build the context stackfunction! s:BuildContextStack(namespaces, szCurrentScope)    let result = copy(a:namespaces)    if a:szCurrentScope != '::'        let tagItem = omni#cpp#utils#GetResolvedTagItem(a:namespaces, omni#cpp#utils#CreateTypeInfo(a:szCurrentScope))        if has_key(tagItem, 'inherits')            let listBaseClass = omni#cpp#utils#GetClassInheritanceList(a:namespaces, omni#cpp#utils#CreateTypeInfo(a:szCurrentScope))            let result = listBaseClass + result        elseif has_key(tagItem, 'kind') && index(['c', 's', 'u'], tagItem.kind[0])>=0            call insert(result, omni#cpp#utils#ExtractTypeInfoFromTag(tagItem))        endif    endif    return resultendfunc" Returns the class scope at the current position of the cursor" @return a string that represents the class scope" eg: ::NameSpace1::Class1" The returned string always starts with '::'" Note: In term of performance it's the weak point of the scriptfunction! s:GetClassScopeAtCursor()    " We store the cursor position because searchpairpos() moves the cursor    let originalPos = getpos('.')    let endPos = originalPos[1:2]    let listCode = []    let result = {'namespaces': [], 'scope': ''}    while endPos!=[0,0]        let endPos = searchpairpos('{', '', '}', 'bW', g:omni#cpp#utils#expIgnoreComments)        let szReStartPos = '[;{}]\|\%^'        let startPos = searchpairpos(szReStartPos, '', '{', 'bWn', g:omni#cpp#utils#expIgnoreComments)        " If the file starts with a comment so the startPos can be [0,0]        " we change it to [1,1]        if startPos==[0,0]            let startPos = [1,1]        endif        " Get lines backward from cursor position to last ; or { or }        " or when we are at the beginning of the file.        " We store lines in listCode        if endPos!=[0,0]            " We remove the last character which is a '{'            " We also remove starting { or } or ; if exits            let szCodeWithoutComments = substitute(omni#cpp#utils#GetCode(startPos, endPos)[:-2], '^[;{}]', '', 'g')            call insert(listCode, {'startLine' : startPos[0], 'code' : szCodeWithoutComments})        endif    endwhile    " Setting the cursor to the original position    call setpos('.', originalPos)    let listClassScope = []    let bResolved = 0    let startLine = 0    " Now we can check in the list of code if there is a function    for code in listCode        " We get the name of the namespace, class, struct or union        " and we store it in listClassScope        let tokens = omni#cpp#tokenizer#Tokenize(code.code)        let bContinue=0        let bAddNamespace = 0        let state=0        for token in tokens            if state==0                if index(['namespace', 'class', 'struct', 'union'], token.value)>=0                    if token.value == 'namespace'                        let bAddNamespace = 1                    endif                    let state= 1                    " Maybe end of tokens                endif            elseif state==1                if token.kind == 'cppWord'                    " eg: namespace MyNs { class MyCl {}; }                    " => listClassScope = [MyNs, MyCl]                    call extend( listClassScope , [token.value] )                    " Add the namespace in result                    if bAddNamespace                        call extend(result.namespaces, [token.value])                        let bAddNamespace = 0                    endif                    let bContinue=1                    break                endif            endif        endfor        if bContinue==1            continue        endif        " Simple test to check if we have a chance to find a        " class method        let aPos = matchend(code.code, '::\s*\~*\s*\w\+\s*(')        if aPos ==-1            continue        endif        let startLine = code.startLine        let listTmp = []        " eg: 'void MyNamespace::MyClass::foo('        " => tokens = ['MyClass', '::', 'MyNamespace', 'void']        let tokens = reverse(omni#cpp#tokenizer#Tokenize(code.code[:aPos-1])[:-4])        let state = 0        " Reading tokens backward        for token in tokens            if state==0                if token.kind=='cppWord'                    call insert(listTmp, token.value)                    let state=1                endif            elseif state==1                if token.value=='::'                    let state=2                else                    break                endif            elseif state==2                if token.kind=='cppWord'                    call insert(listTmp, token.value)                    let state=1                else                    break                endif            endif        endfor                if len(listTmp)            if len(listClassScope)                let bResolved = 1                " Merging class scopes                " eg: current class scope = 'MyNs::MyCl1'                " method class scope = 'MyCl1::MyCl2'                " If we add the method class scope to current class scope                " we'll have MyNs::MyCl1::MyCl1::MyCl2 => it's wrong                " we want MyNs::MyCl1::MyCl2                let index = 0                for methodClassScope in listTmp                    if methodClassScope==listClassScope[-1]                        let listTmp = listTmp[index+1:]                        break                    else                        let index+=1                    endif                endfor            endif            call extend(listClassScope, listTmp)            break        endif    endfor    let szClassScope = '::'    if len(listClassScope)        if bResolved            let szClassScope .= join(listClassScope, '::')        else            let szClassScope = join(listClassScope, '::')                        " The class scope is not resolved, we have to check using            " namespace declarations and search the class scope in each            " namespace            if startLine != 0                let namespaces = ['::'] + omni#cpp#namespaces#GetListFromCurrentBuffer(startLine)                let namespaces = omni#cpp#namespaces#ResolveAll(namespaces)                let tagItem = omni#cpp#utils#GetResolvedTagItem(namespaces, omni#cpp#utils#CreateTypeInfo(szClassScope))                if tagItem != {}                    let szClassScope = omni#cpp#utils#ExtractTypeInfoFromTag(tagItem)                endif            endif        endif    endif    let result.scope = szClassScope    return resultendfunc" Get all contexts at the cursor positionfunction! omni#cpp#namespaces#GetContexts()    " Get the current class scope at the cursor, the result depends on the current cursor position    let scopeItem = s:GetClassScopeAtCursor()    let listUsingNamespace = copy(g:OmniCpp_DefaultNamespaces)    call extend(listUsingNamespace, scopeItem.namespaces)    if g:OmniCpp_NamespaceSearch && &filetype != 'c'        " Get namespaces used in the file until the cursor position        let listUsingNamespace = omni#cpp#namespaces#GetUsingNamespaces() + listUsingNamespace        " Resolving namespaces, removing ambiguous namespaces        let namespaces = omni#cpp#namespaces#ResolveAll(listUsingNamespace)    else        let namespaces = ['::'] + listUsingNamespace    endif    call reverse(namespaces)    " Building context stack from namespaces and the current class scope    return s:BuildContextStack(namespaces, scopeItem.scope)endfunc

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
伊人色综合久久天天| 成人激情午夜影院| 国产99久久久国产精品| 色婷婷综合久久久久中文 | 亚洲第四色夜色| 国产一区二区三区免费| 欧美日韩mp4| 亚洲另类中文字| 成人美女在线观看| 久久天堂av综合合色蜜桃网| 视频在线观看一区| 色综合一区二区三区| 国产网站一区二区| 久久精品国产99久久6| 欧美精品亚洲二区| 欧美高清视频一二三区| 91精品午夜视频| 亚洲一区二区三区中文字幕| 成人国产亚洲欧美成人综合网| 欧美一区日韩一区| 亚洲成人1区2区| 色94色欧美sute亚洲线路二| 中文字幕中文在线不卡住| 国产精品亚洲第一区在线暖暖韩国| 欧美一级高清片在线观看| 五月综合激情日本mⅴ| 91福利国产成人精品照片| 中文字幕日韩一区二区| 国产传媒欧美日韩成人| 久久久一区二区| 韩国中文字幕2020精品| 精品国产3级a| 国产一区二区精品在线观看| 欧美xfplay| 国产成人一级电影| 欧美国产精品中文字幕| 风间由美一区二区av101 | 亚洲成国产人片在线观看| 在线观看av一区二区| 国产精品久久毛片av大全日韩| 成人av在线观| 亚洲人成亚洲人成在线观看图片| av中文一区二区三区| 国产精品久久久久久久久免费桃花 | 偷拍一区二区三区四区| 制服丝袜国产精品| 久久国产精品第一页| 精品粉嫩超白一线天av| 国产一区二区三区不卡在线观看| 26uuu久久综合| 国产一区二区三区国产| 国产精品青草久久| 91国偷自产一区二区三区观看 | 亚洲精品午夜久久久| 欧美日韩精品一区视频| 免费日韩伦理电影| 国产三级久久久| 91久久久免费一区二区| 天天综合网 天天综合色| 欧美剧情电影在线观看完整版免费励志电影 | 日本一不卡视频| 国产欧美一区二区精品忘忧草| 99久久综合99久久综合网站| 夜夜亚洲天天久久| 欧美一级日韩一级| 成人爱爱电影网址| 日韩激情中文字幕| 亚洲国产精品激情在线观看| 欧美在线制服丝袜| 国产美女精品一区二区三区| 亚洲人成精品久久久久| 日韩三级在线观看| 91丝袜美腿高跟国产极品老师 | 日韩欧美中文字幕精品| av在线不卡免费看| 午夜一区二区三区在线观看| 欧美精品一区二| 欧美体内she精高潮| 高清在线成人网| 午夜不卡在线视频| 一色屋精品亚洲香蕉网站| 日韩亚洲国产中文字幕欧美| 91麻豆精品视频| 国内外精品视频| 日韩高清不卡一区二区| 椎名由奈av一区二区三区| 精品精品欲导航| 欧美日韩国产美| 99精品视频一区| 国产精品一区二区三区网站| 天天色天天操综合| 日本一不卡视频| 一区二区三区中文在线| 中文字幕欧美日韩一区| 日韩欧美的一区| 欧美电影影音先锋| 在线亚洲+欧美+日本专区| 成人免费观看av| 国产麻豆成人传媒免费观看| 日韩精品三区四区| 一区二区在线观看免费视频播放| 久久嫩草精品久久久久| 日韩小视频在线观看专区| 欧美日韩不卡视频| 欧美年轻男男videosbes| 日本福利一区二区| 一本色道久久综合狠狠躁的推荐| 精品一区二区免费视频| 久久成人av少妇免费| 麻豆精品视频在线观看视频| 日韩中文字幕亚洲一区二区va在线| 一区二区三区蜜桃| 亚洲一区二三区| 亚洲一区二区三区美女| 一区二区在线免费| 一区av在线播放| 亚洲v中文字幕| 亚洲国产另类av| 天堂久久一区二区三区| 丝袜美腿成人在线| 日韩中文字幕1| 免费看日韩精品| 蜜桃av一区二区三区电影| 日韩av不卡一区二区| 另类成人小视频在线| 欧美日韩高清一区二区不卡| 欧美视频在线一区二区三区 | 国产精品亚洲第一区在线暖暖韩国| 精品无码三级在线观看视频| 久久国产人妖系列| 成人在线视频一区二区| 色婷婷国产精品综合在线观看| 91在线精品一区二区| 欧美日韩在线直播| 精品伦理精品一区| 中文字幕久久午夜不卡| 亚洲激情第一区| 日韩高清欧美激情| 国产一区二区在线电影| 成人晚上爱看视频| 欧美羞羞免费网站| 欧美不卡激情三级在线观看| 国产欧美视频在线观看| 一区二区三区波多野结衣在线观看| 亚洲va欧美va人人爽午夜| 韩国一区二区视频| 99久久er热在这里只有精品66| 欧美调教femdomvk| 久久久久国产精品厨房| 亚洲激情第一区| 久久国产婷婷国产香蕉| 91小宝寻花一区二区三区| 欧美日韩mp4| 中文欧美字幕免费| 日韩和欧美一区二区| 成人免费视频国产在线观看| 欧美日韩一级片网站| 久久久精品国产免费观看同学| 久久99精品久久久久久久久久久久| 成人av在线播放网站| 欧美一级黄色片| 中文字幕精品一区二区精品绿巨人 | av电影一区二区| 91精品婷婷国产综合久久性色 | 精品国产一区a| 亚洲精品五月天| 国内精品嫩模私拍在线| 色婷婷狠狠综合| 精品福利一区二区三区免费视频| 亚洲精品成人少妇| 国产精品69久久久久水密桃| 这里只有精品99re| 亚洲人成在线播放网站岛国| 国产精品中文欧美| 欧美日韩aaaaaa| 一区二区高清免费观看影视大全| 国产一区视频在线看| 欧美一区二区视频网站| 亚洲老司机在线| 波多野结衣在线aⅴ中文字幕不卡| 日韩一区二区高清| 亚洲国产成人91porn| 91视频免费观看| 国产精品久久久久久久久免费樱桃 | 欧美日韩精品福利| 中文字幕精品一区二区精品绿巨人 | 99久久综合狠狠综合久久| 国产亚洲精品免费| 久久精品国产网站| 制服丝袜亚洲色图| 亚洲国产日韩精品| 在线免费观看不卡av| 中文字幕中文字幕一区| 成人在线视频一区| 欧美激情在线看| 国产不卡一区视频| 久久精品亚洲一区二区三区浴池| 人人超碰91尤物精品国产| 欧美无砖专区一中文字| 亚洲尤物在线视频观看|