Python support, some quick-fixes#2
Open
Shtucer wants to merge 7 commits into
Open
Conversation
Owner
There was a problem hiding this comment.
Э, зачем все это пееписывать на питон?
Author
There was a problem hiding this comment.
А затем, что у меня Vim собран с питоном, но без перла. Да и с перлом в Винде тяжко, а работать на ней иногда приходится.
Author
There was a problem hiding this comment.
Возвращаясь к разговору о переписанных на питон функциях. Переписал src_files и header_files на VimL. В принципе избавился от внешних зависимостей. Получилось вот что.
function s:cmake_project_find_files()
let currentdir = getcwd() . '/' . g:cmake_project_build_dir
let dependencies = globpath(currentdir, "**/DependInfo.cmake")
let internals = globpath(currentdir, "**/depend.internal")
let result = []
for depend in split(dependencies)
if filereadable(depend)
for line in readfile(depend)
let filename = matchlist(line, '\(^\s\+"\)\([[:graph:]]\+[.c|.cpp|.cc]\)"')
if len(filename) > 1 && strlen(filename[2])
call add(result, filename[2])
endif
endfor
endif
endfor
for internal in split(internals)
if filereadable(internal)
for line in readfile(internal)
let filename = matchlist(line, '\(^\s\+\)\([[:graph:]]\+[.h|.hh|.hpp]\)')
if len(filename) >1 && strlen(filename[2]) && match(getcwd(), filename[2]) != -1
call add(result, filename[2])
endif
endfor
endif
endfor
return result
endfunction
Owner
There was a problem hiding this comment.
Ужас какой 👍
Думаю алгоритм поиска файлов переписать. То что сейчас ui файлы и cmake, CMakeLists.txt файлы не добавляет в проект
Owner
There was a problem hiding this comment.
А можешь тогда питоно код убрать с проекта чтобы я смержнул?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Python support, some quick-fixes.